1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/patches/glibc/ports-2.10.1/290-undefine-__i686.patch Fri Apr 08 00:59:32 2011 +0200
1.3 @@ -0,0 +1,42 @@
1.4 +If gcc is configured to generate i686 code or better by default (like
1.5 +when using the --with-arch=pentium3 configure option), then the __i686
1.6 +macro will always be defined automatically and thus screw up the
1.7 +compilation of some .S files.
1.8 +http://bugs.gentoo.org/131108
1.9 +http://sourceware.org/ml/libc-alpha/2006-04/msg00090.html
1.10 +
1.11 +2006-04-25 Mike Frysinger <vapier@gentoo.org>
1.12 +
1.13 + * sysdeps/i386/sysdep.h (__i686): Undefine.
1.14 +
1.15 +diff -durN glibc-2.10.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.10.1/nptl/sysdeps/pthread/pt-initfini.c
1.16 +--- glibc-2.10.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2007-06-17 20:02:01.000000000 +0200
1.17 ++++ glibc-2.10.1/nptl/sysdeps/pthread/pt-initfini.c 2009-11-13 00:50:22.000000000 +0100
1.18 +@@ -45,6 +45,9 @@
1.19 + /* Embed an #include to pull in the alignment and .end directives. */
1.20 + asm ("\n#include \"defs.h\"");
1.21 +
1.22 ++/* Embed an #include to pull in asm settings. */
1.23 ++asm ("\n#ifdef __i686__\n#include <sysdep.h>\n#endif");
1.24 ++
1.25 + /* The initial common code ends here. */
1.26 + asm ("\n/*@HEADER_ENDS*/");
1.27 +
1.28 +diff -durN glibc-2.10.1.orig/sysdeps/i386/sysdep.h glibc-2.10.1/sysdeps/i386/sysdep.h
1.29 +--- glibc-2.10.1.orig/sysdeps/i386/sysdep.h 2006-10-28 08:44:03.000000000 +0200
1.30 ++++ glibc-2.10.1/sysdeps/i386/sysdep.h 2009-11-13 00:50:22.000000000 +0100
1.31 +@@ -18,6 +18,14 @@
1.32 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1.33 + 02111-1307 USA. */
1.34 +
1.35 ++/*
1.36 ++ * When building for i686 targets or better, gcc automatically defines
1.37 ++ * '__i686' to '1' for us which causes trouble when using section names
1.38 ++ * like '__i686.get_pc_thunk.reg'. Since we check for __i686__ in the
1.39 ++ * code, killing '__i686' shouldn't be a problem.
1.40 ++ */
1.41 ++#undef __i686
1.42 ++
1.43 + #include <sysdeps/generic/sysdep.h>
1.44 +
1.45 + #ifdef __ASSEMBLER__