Bug 215266 - Please use -Wl,--as-needed -Wl,-z,defs linker flags
Summary: Please use -Wl,--as-needed -Wl,-z,defs linker flags
Status: REPORTED
Alias: None
Product: buildsystem
Classification: Developer tools
Component: KDE4 (cmake) (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Alexander Neundorf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-19 12:17 UTC by Adrian von Bidder
Modified: 2021-03-09 05:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian von Bidder 2009-11-19 12:17:28 UTC
Version:            (using Devel)
Compiler:          GNU tool chain 
OS:                Linux
Installed from:    Compiled sources

Heyho!

As discussed a long time ago:

-Wl,--as-needed -Wl,-z,defs should be used to compile and link (almost) all applications.

This makes the dependency lists of distribution packages much smaller, allowing for easier upgrades of libraries (I know this for a fact for the Debian unstable -> testing cycle, but probably other distributions face similar problems.)

I'm currently using these flags for the Debian package, but I think they could as well be used by default instead of in a Debian specific addition.

(... is there a bugzilla category for the KDE default build system as a whole?  I *think* that the flags might as well be used by default on any ELF based platform where the GNU toolchain is used.)
Comment 1 Urs Wolfer 2009-11-21 15:25:42 UTC
This is something the buildsystem team needs to decide about.
Comment 2 Justin Zobel 2021-03-09 05:27:10 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.