@@ -1,5 +1,10 @@
2011-02-13 H.J. Lu <hongjiu.lu@intel.com>
+ * config/i386/morestack.S: Properly check __x86_64__ and
+ __LP64__.
+
+2011-02-13 H.J. Lu <hongjiu.lu@intel.com>
+
* config.gcc: Support --enable-x32 for x86 Linux targets.
* configure.ac: Support --enable-x32.
@@ -477,7 +477,7 @@ __morestack:
.section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
.type DW.ref.__gcc_personality_v0, @object
DW.ref.__gcc_personality_v0:
-#ifndef __x86_64
+#ifndef __LP64___
.align 4
.size DW.ref.__gcc_personality_v0, 4
.long __gcc_personality_v0
@@ -488,7 +488,7 @@ DW.ref.__gcc_personality_v0:
#endif
#endif
-#ifdef __x86_64__
+#if defined __x86_64__ && defined __LP64__
# This entry point is used for the large model. With this entry point
# the upper 32 bits of %r10 hold the argument size and the lower 32
@@ -521,7 +521,7 @@ __morestack_large_model:
.size __morestack_large_model, . - __morestack_large_model
#endif
-#endif /* __x86_64__ */
+#endif /* __x86_64__ && __LP64__ */
# Initialize the stack test value when the program starts or when a
# new thread starts. We don't know how large the main stack is, so we
@@ -576,7 +576,7 @@ __stack_split_initialize:
.section .ctors.65535,"aw",@progbits
-#ifndef __x86_64__
+#ifndef __LP64___
.align 4
.long __stack_split_initialize
.long __morestack_load_mmap
Hi, I am checking this patch into x32 branch to compile i386/morestack.S for x32. H.J. --- From f0440a5aa8fcac7fb1e4630cbbbb743d56365bb5 Mon Sep 17 00:00:00 2001 From: H.J. Lu <hjl.tools@gmail.com> Date: Sun, 13 Feb 2011 14:58:23 -0800 Subject: [PATCH 2/3] Properly check __x86_64__ and __LP64__ in i386/morestack.S. --- gcc/ChangeLog.x32 | 5 +++++ libgcc/config/i386/morestack.S | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-)