RFC: -Wl,--as-needed by default

Hash: SHA256


I'm interested why we still don't have this flag in our CFLAGS? It seems that
other distributions like openSUSE enable it by default and it helps in many
cases to avoid over-linking (for example, see thread about poppler).

Are there any reasons not to add it?


Re: RFC: -Wl,--as-needed by default

By =?UTF-8?Q?Bj=c3... at 11/13/2017 - 05:52

Am Montag, den 13.11.2017, 11:02 +0100 schrieb Igor Gnatenko:

Hello Igor,

that specific flag should be in LDFLAGS, but there are reasons, we do
NOT have it in there, because it will likely break any binaries built
from or containing FORTRAN sources. They will simply SEGFAULT, because
`-Wl,--as-needed` causes some needed runtime libraries NOT being linked
with them, because the linker thinks they are not needed / would over


Re: RFC: -Wl,--as-needed by default

By Daniel P. Berrange at 11/13/2017 - 06:06

On Mon, Nov 13, 2017 at 11:52:14AM +0100, Björn 'besser82' Esser wrote:
What % of our distro involves fortran though ? Could this be as simple as
enabling it by default, but having an easy way via an RPM macro to opt-out
of it in the handleful of packages that matter wrt fortran.