This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix build with compiler defining __i686 (bug 411)


On Thu, 2 Feb 2012, Roland McGrath wrote:

> Finally, actually deal with __i686.

This patch does that, given the previous patches posted.

2012-02-06  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/i386/sysdep.h (__i686): Undefine and redefine.

diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index 1dbb8e1..c1dac6c 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -23,7 +23,13 @@
 #include <features.h> /* For __GNUC_PREREQ.  */
 
 /* It is desirable that the names of PIC thunks match those used by
-   GCC so that multiple copies are eliminated by the linker.  */
+   GCC so that multiple copies are eliminated by the linker.  Because
+   GCC 4.6 and earlier use __i686 in the names, it is necessary to
+   override that predefined macro.  */
+#if defined __i686 && defined __ASSEMBLER__
+#undef __i686
+#define __i686 __i686
+#endif
 
 #ifdef	__ASSEMBLER__
 # if __GNUC_PREREQ (4, 7)

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]