http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49371
Summary: xgcc: error: unrecognized option '-pie' on *-apple-darwin* Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: driver AssignedTo: unassig...@gcc.gnu.org ReportedBy: domi...@lps.ens.fr CC: mikest...@comcast.net, jos...@codesourcery.com, r...@cebitec.uni-bielefeld.de, ia...@gcc.gnu.org Host: *-apple-darwin* Target: *-apple-darwin* Build: *-apple-darwin* On *-apple-darwin* revisions 174909 and 174910 introduced several failures in gcc.dg/torture/tls/* with '-pie -fPIE' (see http://gcc.gnu.org/ml/gcc-testresults/2011-06/msg01259.html ). The errors are all (AFAICT) of the kind. FAIL: gcc.dg/torture/tls/thr-init-1.c -O0 -pie -fpie (test for excess errors) Excess errors: xgcc: error: unrecognized option '-pie' My understanding of -pie is that it is a linker option supported by *-apple-darwin9 and later. Apparently this option is not recognized by gcc since at least version 4.4.4, this is why I mark this PR as a driver one (please change it if you disagree). A short term fix will be to remove darwin from proc check_effective_target_pie { } { if { [istarget *-*-darwin\[912\]*] || [istarget *-*-linux*] } { return 1; } return 0 } in gcc/testsuite/lib/target-supports.exp, but I think the darwin driver should be fixed.