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