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 19:03:04 +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 #16 from Iain Sandoe <iains at gcc dot gnu.org> 2011-06-12 19:01:51 UTC ---
(In reply to comment #15)
> I have bootstrapped gcc on x86_64-apple-darwin10.7.0 with the patch in comment
> #14 and the tests for gcc and tls.exp pass without unexpected failure. I just
> noticed the following oddity:
>
> [macbook] f90/bug% gfc -m64 -fpie -mdynamic-no-pic pr49331.f90
> gfc: note: '-mdynamic-no-pic' overides '-pie', '-fpie' or '-fPIE'
> [macbook] f90/bug% gfc -m32 -fpie -mdynamic-no-pic pr49331.f90
> f951: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie', '-fPIE'
> or '-pie' [enabled by default]
> gfc: note: '-mdynamic-no-pic' overides '-pie', '-fpie' or '-fPIE'
> [macbook] f90/bug% gcc47 -m64 -fpie -mdynamic-no-pic backtrace.c
> gcc47: note: '-mdynamic-no-pic' overides '-pie', '-fpie' or '-fPIE'
> [macbook] f90/bug% gcc47 -m32 -fpie -mdynamic-no-pic backtrace.c
> cc1: warning: '-mdynamic-no-pic' overrides '-fpic', '-fPIC', '-fpie', '-fPIE'
> or '-pie' [enabled by default]
> gcc47: note: '-mdynamic-no-pic' overides '-pie', '-fpie' or '-fPIE'
Those are correct - the options conflict [i.e. you can't have -pie and
-mdynamic-no-pic at the same time].
> Is it expected that the warning appears with -m32, but not with -m64? I also
> got
Yes, I guess so on x86, mdynamic-no-pic has no effect for m64 (x86) ...
... I need to check what happens for m64 powerpc (but suspect it still
applies).
> [macbook] f90/bug% gcc47 -m32 -fno-PIC -pie backtrace.c
> ld: cannot link -pie: -mdynamic-no-pic codegen found in _myfunc3 from
> /var/tmp//cccDWsse.o
> collect2: error: ld returned 1 exit status
Hmm. That is an uncaught conflict, I think .. IIRC, pie requires position
independent code.. so something's not 100% right... (perhaps there should be
an error from cc1 in that case).
thanks, as always for the checking -
- don't know when/if I'll get a chance to look further at this .. so anyone
else is welcome to take my patchlet forward ...