This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]