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.

Reply via email to