Home_greyopenFATE - openSUSE feature tracking > #311355
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

add LDFLAGS=-fuse-linker-plugin to %configure

Feature state

Buildservice
Done

Description

openSuSE uses GCC as the compiler of choice. The compiler uses a link editor to build executable objects; the default link editor is called collect2 and collect2 uses ld to perform the final link.
However, the GCC suite distributes another linker called gold. Gold replaces collect2. It is enabled by telling gcc to -fuse-linker-plugin; this is not the default.
The default settings for the GNU build system on openSuSE are provided in an RPM macro called %configure.
My suggestion is to add LDFLAGS=-fuse-linker-plugin to this macro.

User benefit:

=== RPATH ===

The traditional link editor ld adds an RPATH header in ELF executeable objects. Such objects are considered a security threat by the tool brp-rpath and binary packages containing them fail to build.
The header is injected when the object is linked against a shared library that is not placed in a standard operating system directory; this may happen during a package build when a library and a dependent executable are built together and a library is located by means of the environment variable $LD_RUN_PATH.
The gold link editor does not have this problem because it is unaffected by the value of $LD_RUN_PATH.

== EFFICIENCY ==
The gold link editor performs better and requires less system resources than the traditional link editor ld.

Testcase

== ImageMagick ==
Try to build ImageMagick using the specification file from the upstream tarball (version 6.6.7-7). The packager fails because the PERL extension Magick.so contains an RPATH declaration.

== Qt ==
Try to build Qt from source in a KDE session with 1 GB physical RAM. The traditional link editor never halts because it does not have enough RAM.

Discussion


icons/user_comment.png M. M. wrote: (6 years ago)

this is done by gcc 4.6 by default according to richi. So its not necessary anymore to have it in the buildsystem configured.

Last change: 6 years ago
Voting
Score: 1
  • Negative: 0
  • Neutral: 0
  • Positive: 1
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint