Adriaan van Os wrote:
It looks like the Apple gcc back-end folks now finally woke up http://gcc.gnu.org/ml/gcc-patches/2005-11/msg02158.html.
Yes, a quick hack to gcc-3.4.4 (included as a separate file), together with the below patch (my apologies), solves the remaining compiler problems for position independent code on i686-apple-darwin
Still, another problem, -Os is broken on i686-apple-darwin, but the following patch (taken from http://gcc.gnu.org/ml/gcc-patches/2005-12/msg01656.html) fixes it.
--- gcc-3.4.5/gcc/config/i386/i386.c.orig 2005-12-22 10:49:44.000000000 +0100 +++ gcc-3.4.5/gcc/config/i386/i386.c 2005-12-22 09:16:54.000000000 +0100 @@ -1357,9 +1357,8 @@ The default of 128 bits is for Pentium III's SSE __m128, but we don't want additional code to keep the stack aligned when optimizing for code size. */ - ix86_preferred_stack_boundary = (optimize_size - ? TARGET_64BIT ? 128 : 32 - : 128); + ix86_preferred_stack_boundary = ((TARGET_64BIT || TARGET_MACHO || !optimize_size) + ? 128 : 32); if (ix86_preferred_stack_boundary_string) { i = atoi (ix86_preferred_stack_boundary_string);
That was the last one (I hope).
Regards,
Adriaan van Os