Feature changed by: Marcus Meissner (msmeissn) Feature #311355, revision 2 Title: add LDFLAGS=-fuse-linker-plugin to %configure Buildservice: Unconfirmed Priority Requester: Desirable Requested by: Christopher Yeleighton (yecril71pl) Partner organization: openSUSE.org 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. Test Case: == 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. Business case (Partner benefit): openSUSE.org: === 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. + Discussion: + #1: Marcus Meissner (msmeissn) (2011-05-26 15:03:07) + this is done by gcc 4.6 by default according to richi. So its not + necessary anymore to have it in the buildsystem configured. -- openSUSE Feature: https://features.opensuse.org/311355