------- Comment #4 from howarth at nitro dot med dot uc dot edu 2010-08-30
22:44 -------
(In reply to comment #3)
Richard,
The following patch fails to bootstrap...
Index: i386/darwin.h
===================================================================
--- i386/darwin.h (revision 163661)
+++ i386/darwin.h (working copy)
@@ -77,10 +77,12 @@
/* 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
+ or dynamic loader. Let STACK_BOUNDARY be set using UNITS_PER_WORD as
+ non-leaf functions should be handled by MIN_STACK_BOUNDARY of 128. */
+#undef MIN_STACK_BOUNDARY
+#define MIN_STACK_BOUNDARY 128
+
#undef MAIN_STACK_BOUNDARY
#define MAIN_STACK_BOUNDARY 128
The problem begins with...
/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./gcc/xgcc
-B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./gcc/
-B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/
-B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/lib/ -isystem
/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/include -isystem
/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/sys-include -g -O2 -O2 -g -O2
-DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I.
-I../.././gcc -I../../../gcc-4.6-20100830/libgcc
-I../../../gcc-4.6-20100830/libgcc/. -I../../../gcc-4.6-20100830/libgcc/../gcc
-I../../../gcc-4.6-20100830/libgcc/../include -DHAVE_CC_TLS -DUSE_EMUTLS
-fvisibility=hidden -DHIDE_EXPORTS -c eh_dummy.c \
-o eh_dummy.o; \
objects=eh_dummy.o; \
fi; \
ar rc libgcc.a $objects
/usr/bin/nm: no name list
...
showing that MIN_STACK_BOUNDARY is insufficient to maintain alignment on system
calls.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36502