Note from Change Wrangler: This Change Proposal requires mass rebuild.
However, two weeks ago (June 19th), we have already passed the
deadline for Change proposals requiring mass rebuild. I will leave the
decision whether this Change proposal is accepted or not to RelEng and
FESCo teams.
= Proposed System Wide Change: Remove Excessive Linking =
https://fedoraproject.org/wiki/Changes/RemoveExcessiveLinking
Owner(s):
* Igor Gnatenko <ignatenkobrain at fedoraproject dot org>
* Neal Gompa <ngompa13 at gmail dot com>
Pass "--as-needed" flag the linker through default system-wide LDFLAGS.
== Detailed description ==
The flag ("--as-needed") tells the linker to link in the produced
binary only the libraries containing symbols actually used by the
binary itself. This binary can be either a final executale or another
library.
The use of the "--as-needed" flag allows the linker to avoid linking
extra libraries in a binary. This not only improves startup times (as
the loader does not have to load all the libraries for every step) but
might avoid the full initialization of big frameworks.
== Scope ==
* Proposal owners:
Add "-Wl,--as-needed" into RPM_LD_FLAGS (in redhat-rpm-config).
* Other developers:
Nothing should break, but immediate work-around would be to disable
this flag (will be provided in redhat-rpm-config) and fix real issue
later.
* Release engineering:
#7604 [
https://pagure.io/releng/issue/7604] (mass rebuild is desired
after this change).
** List of deliverables:
N/A (not a System Wide Change)
* Policies and guidelines:
Add information how to turn it off (TODO link to FPC ticket).
* Trademark approval:
N/A (not needed for this Change)
--
Jan Kuřík
JBoss EAP Program Manager
Red Hat Czech s.r.o., Purkynova 99/71, 612 45 Brno, Czech Republic