This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] use -fno-pie on darwin in boehm-gc.exp
- From: Jack Howarth <howarth at bromo dot med dot uc dot edu>
- To: gcc-patches at gcc dot gnu dot org
- Cc: mikestump at comcast dot net, iains at gcc dot gnu dot org, hboehm at gcc dot gnu dot org
- Date: Thu, 8 Dec 2011 10:38:55 -0500
- Subject: [PATCH] use -fno-pie on darwin in boehm-gc.exp
Currently the boehm-gc testsuite fails...
FAIL: boehm-gc.c/gctest.c -O2 execution test
FAIL: boehm-gc.c/leak_test.c -O2 execution test
FAIL: boehm-gc.c/thread_leak_test.c -O2 execution test
FAIL: boehm-gc.lib/staticrootstest.c -O2 execution test
on x86_64-apple-darwin11 due to the -pie linker default. The attached patch
uses -fno-pie on darwin to insure that -no_pie is passed to the linker when
targeting darwin11 or later. This approach is used because istarget doesn't
support complex regex to allow -Wl,-no_pie to be passed for darwin11 and later
only (since only recent Xcode releases understand the -no_pie linker option).
Also, -fno_pie has the advantage of supporting -mmacosx-version-min usage.
Regression tested on x86_64-apple-darwin11...
http://gcc.gnu.org/ml/gcc-testresults/2011-12/msg00856.html
Okay for gcc trunk?
Jack
boehm-gc/
2011-12-08 Jack Howarth <howarth@bromo.med.uc.edu>
* testsuite/lib/boehm-gc.exp: Use -fno-pie on darwin.
Index: boehm-gc/testsuite/lib/boehm-gc.exp
===================================================================
--- boehm-gc/testsuite/lib/boehm-gc.exp (revision 182117)
+++ boehm-gc/testsuite/lib/boehm-gc.exp (working copy)
@@ -214,6 +214,11 @@ proc boehm-gc_target_compile { source de
lappend options "additional_flags=-I${gc_include} -I${srcdir}/../include"
lappend options "additional_flags=${threadcflags}"
+ # Disable -pie linker default for darwin11 and later using -fno-pie.
+ if { [istarget *-*-darwin*] } {
+ lappend options "additional_flags=-fno-pie"
+ }
+
lappend options "libs=-Wc,-shared-libgcc"
if { [file extension $dest] == ".la" } {