http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49371
--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> 2011-06-11 20:08:35
UTC ---
(In reply to comment #8)
> (In reply to comment #7)
> This patch bootstraps fine on x86_64-apple-darwin11 and passes -pie as
> expected...
>
>
> [MacPro:~] howarth% gcc-fsf-4.7 -fpie -v himenoBMTxpa.c
> ...
>
> /usr/bin/ld -dynamic -arch x86_64 -macosx_version_min 10.7.0 -pie
> -weak_reference_mismatches non-weak -o a.out -lcrt1.10.5.o
> -L/sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.0.0/4.7.0
> -L/sw/lib/gcc4.7/lib/gcc/x86_64-apple-darwin11.0.0/4.7.0/../../..
> /var/folders/1l/n78sywl52lz6kkys6nv7mnph0000gp/T//ccwqghgh.o
> -no_compact_unwind
> -lSystem -lgcc_ext.10.5 -lgcc -lSystem -v
it is, however, wrong for darwin8 - there's a typo:
+#define PIE_SPEC "{-fpie|pie|fPIE:}"
---------------^ (should not have a '-').
thus:
+#define PIE_SPEC "{fpie|pie|fPIE:}"