]> git.wh0rd.org - patches.git/blob - glibc-undefine-__i686.patch
sync vapier-m
[patches.git] / glibc-undefine-__i686.patch
1 If gcc is configured to generate i686 code or better by default (like
2 when using the --with-arch=pentium3 configure option), then the __i686
3 macro will always be defined automatically and thus screw up the
4 compilation of some .S files.
5 http://bugs.gentoo.org/131108
6
7 2006-04-25 Mike Frysinger <vapier@gentoo.org>
8
9 * sysdeps/i386/sysdep.h (__i686): Undefine.
10
11 --- sysdeps/i386/sysdep.h
12 +++ sysdeps/i386/sysdep.h
13 @@ -1,5 +1,6 @@
14 /* Assembler macros for i386.
15 - Copyright (C) 1991-93,95,96,98,2002,2003,2005 Free Software Foundation, Inc.
16 + Copyright (C) 1991-93,95,96,98,2002,2003,2005,2006
17 + Free Software Foundation, Inc.
18 This file is part of the GNU C Library.
19
20 The GNU C Library is free software; you can redistribute it and/or
21 @@ -17,6 +18,14 @@
22 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 02111-1307 USA. */
24
25 +/*
26 + * When building for i686 targets or better, gcc automatically defines
27 + * '__i686' to '1' for us which causes trouble when using section names
28 + * like '__i686.get_pc_thunk.reg'. Since we check for __i686__ in the
29 + * code, killing '__i686' shouldn't be a problem.
30 + */
31 +#undef __i686
32 +
33 #include <sysdeps/generic/sysdep.h>
34
35 #ifdef __ASSEMBLER__
36
37 2006-04-25 Mike Frysinger <vapier@gentoo.org>
38
39 * sysdeps/pthread/pt-initfini.c: Include sysdep.h.
40
41 --- nptl/sysdeps/pthread/pt-initfini.c
42 +++ nptl/sysdeps/pthread/pt-initfini.c
43 @@ -1,5 +1,5 @@
44 /* Special .init and .fini section support. Linuxthread version.
45 - Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
46 + Copyright (C) 1995-1997,2000-2002,2006 Free Software Foundation, Inc.
47 This file is part of the GNU C Library.
48
49 The GNU C Library is free software; you can redistribute it
50 @@ -45,6 +45,9 @@
51 /* Embed an #include to pull in the alignment and .end directives. */
52 asm ("\n#include \"defs.h\"");
53
54 +/* Embed an #include to pull in asm settings. */
55 +asm ("\n#include <sysdep.h>");
56 +
57 /* The initial common code ends here. */
58 asm ("\n/*@HEADER_ENDS*/");
59