From 76480b6b18868754fc95ff41d02885898c54367f Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Tue, 17 Apr 2012 20:37:01 -0300 Subject: Updating the cross toolchain for mips64el Added patches from upstream and diff'ed with them. Binutils and linux-libre-api-headers are already built. GCC Core builts but `mips64el-unknown-linux-gnu-gcc -v dummy.c` fails because of missing -EL on i686-pc-linux-gnu-as. Exporting mips64el-...-binutils to the PATH solves the problem but mips64el-...-ld fails with missing crt*. No idea why target gcc decides to use the host as instead of the target one, since the PKGBUILD hasn't fundamentally changed. --- .../glibc-__i686.patch | 43 +++++++++++++++------- 1 file changed, 30 insertions(+), 13 deletions(-) (limited to 'cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch') diff --git a/cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch b/cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch index 28d5dd424..731131527 100644 --- a/cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch +++ b/cross/mips64el-unknown-linux-gnu-glibc/glibc-__i686.patch @@ -1,13 +1,30 @@ -diff -Naur glibc-old//sysdeps/i386/Makefile glibc//sysdeps/i386/Makefile ---- glibc-old//sysdeps/i386/Makefile 2010-03-18 11:52:30.000000000 +1000 -+++ glibc//sysdeps/i386/Makefile 2010-04-16 15:05:50.000000000 +1000 -@@ -1,6 +1,7 @@ - # The mpn functions need a #define for asm syntax flavor. --# Every i386 port in use uses gas syntax (I think). --asm-CPPFLAGS += -DGAS_SYNTAX -+# Every i386 port in use uses gas syntax (I think). Don't replace -+# __i686 in __i686.get_pc_thunk.bx. -+asm-CPPFLAGS += -DGAS_SYNTAX -U __i686 - - # The i386 `long double' is a distinct type we support. - long-double-fcts = yes +diff --git a/nptl/sysdeps/pthread/pt-initfini.c b/nptl/sysdeps/pthread/pt-initfini.c +index 9c00dc0..f5d4df8 100644 +--- a/nptl/sysdeps/pthread/pt-initfini.c ++++ b/nptl/sysdeps/pthread/pt-initfini.c +@@ -45,6 +45,11 @@ + /* Embed an #include to pull in the alignment and .end directives. */ + asm ("\n#include \"defs.h\""); + ++asm ("\n#if defined __i686 && defined __ASSEMBLER__"); ++asm ("\n#undef __i686"); ++asm ("\n#define __i686 __i686"); ++asm ("\n#endif"); ++ + /* The initial common code ends here. */ + asm ("\n/*@HEADER_ENDS*/"); + +diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h +index 64ef400..726b1df 100644 +--- a/sysdeps/unix/sysv/linux/i386/sysdep.h ++++ b/sysdeps/unix/sysv/linux/i386/sysdep.h +@@ -29,6 +29,10 @@ + #include + #include + ++#if defined __i686 && defined __ASSEMBLER__ ++#undef __i686 ++#define __i686 __i686 ++#endif + + /* For Linux we can use the system call table in the header file -- cgit v1.2.3-54-g00ecf