This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/77464] gcc -no-pie breaks -shared
- From: "balint at balintreczey dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 21 Sep 2016 17:11:46 +0000
- Subject: [Bug c/77464] gcc -no-pie breaks -shared
- Auto-submitted: auto-generated
- References: <bug-77464-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77464
--- Comment #11 from Balint Reczey <balint at balintreczey dot hu> ---
(In reply to Manuel López-Ibáñez from comment #10)
> (In reply to Andrew Pinski from comment #5)
> > (In reply to Manuel López-Ibáñez from comment #3)
> > > Or at least give a clearer error that mentions -fPIC ...
> >
> > Actually this is not a driver issue just a binutils issue if that. Why add
> > no-pie anyways to the ldflags.
>
> GCC controls the driver and decides what to pass to the linker.
>
> (In reply to Andrew Pinski from comment #8)
> > Basically -no-pie says you are now doing an executable overriding the
> > previous -shared. This is not a bug, you want -no-pie -shared.
>
> This seems counter-intuitive to how other options work. The documentation
> says nothing about it. Then we wonder why people complain that GCC is harder
> to use/learn.
This is both counter-intuitive and inconvenient but I have to move on.
I take this a WONTFIX and continue paving the way for using
--enable-default-pie in Debian in a less pleasant way.
Thank you at least for the quick response.