This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Stack alignment on x86-darwin
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org
- Cc: mstump at apple dot com, echristo at apple dot com
- Date: Thu, 7 Jun 2007 19:27:10 -0700 (PDT)
- Subject: Stack alignment on x86-darwin
This is what was causing every C++ and execute testcase to fail on
i386-darwin9.
It is apparently not the cause of the libjava build failure during the
bootstrap. I guess I need to keep debugging...
Bootstrapped (up to libjava) and tested on i386-darwin9, including
libstdc++.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-i386-darwinstackalign.patch===========
2007-06-07 Geoffrey Keating <geoffk@apple.com>
* config/i386/darwin.h (STACK_BOUNDARY): Define.
Index: gcc/config/i386/darwin.h
===================================================================
--- gcc/config/i386/darwin.h (revision 125538)
+++ gcc/config/i386/darwin.h (working copy)
@@ -69,6 +69,12 @@
#undef TARGET_KEEPS_VECTOR_ALIGNED_STACK
#define TARGET_KEEPS_VECTOR_ALIGNED_STACK 1
+/* On Darwin, the stack is 128-bit aligned at the point of every call.
+ Failure to ensure this will lead to a crash in the system libraries
+ or dynamic loader. */
+#undef STACK_BOUNDARY
+#define STACK_BOUNDARY 128
+
/* We want -fPIC by default, unless we're using -static to compile for
the kernel or some such. */
============================================================