[Bug driver/49371] xgcc: error: unrecognized option '-pie' on *-apple-darwin*

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jun 12 20:34:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49371

--- Comment #21 from Iain Sandoe <iains at gcc dot gnu.org> 2011-06-12 20:33:24 UTC ---
check m64 on powerpc-darwin9 and it appears to do the Right Thing;  
mdynamic-no-pic still applies for m64/powerpc and we get:

$ ./gcc/xgcc -Bgcc ../tests/hello.c -o hc -fpie -mdynamic-no-pic -m64
cc1: warning: ‘-mdynamic-no-pic’ overrides ‘-fpic’, ‘-fPIC’, ‘-fpie’, ‘-fPIE’
or ‘-pie’ [enabled by default]
xgcc: note: '-mdynamic-no-pic' overides '-pie', '-fpie' or '-fPIE'

c.f. system compiler:

$ gcc-4.2 ../tests/hello.c -o hc -fpie -mdynamic-no-pic -m64
../tests/hello.c:1: warning: -mdynamic-no-pic overrides -fpic or -fPIC
ld: absolute addressing (perhaps -mdynamic-no-pic) used in _main from
/var/folders/17/17RRKLjrExOvsenOKYzNhk++-0E/-Tmp-//cc5VGi6o.o not allowed in
slidable image. Use '-read_only_relocs suppress' to enable text relocs

(I think the messages issued by the patched compiler are clearer than the
system tools .. but opinions welcome).



More information about the Gcc-bugs mailing list