This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/49371] xgcc: error: unrecognized option '-pie' on *-apple-darwin*
- From: "iains at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 12 Jun 2011 09:57:20 +0000
- Subject: [Bug driver/49371] xgcc: error: unrecognized option '-pie' on *-apple-darwin*
- Auto-submitted: auto-generated
- References: <bug-49371-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49371
--- Comment #10 from Iain Sandoe <iains at gcc dot gnu.org> 2011-06-12 09:56:28 UTC ---
Created attachment 24496
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24496
adjust specs for darwin to make 'pie', 'fpie' and 'fPIE' do the same.
This is might be a step in the right direction - it 'works' on Darwin 8 & 9 and
from Jack's comment on Darwin 11 (which makes one expect it to be OK on Darwin
10).
However:
1. It does not prove that the code-gen is right/appropriate (I assume the
test-cases do - but I don't have time to read code right now).
2. It is *incomplete* - there should be a check in darwin.c that determines if
mdynamic-no-pic is given at the same time as pie (they are not compatible).
The linker will reject-it - but we should deal with it earlier.
3. It assumes that mapping all of 'pie' 'fpie' fPIE' => pie is the Right Thing
to do on Darwin. I don't know that this is necessarily the case (it might be
more appropriate to reject unused ones with an error). However, at present,
we're no worse off than the system compliers in that they accept the flags and
ignore them silently.