sys-devel/binutils: add USE=default-gold, bug #496760
authorSergei Trofimovich <slyfox@gentoo.org>
Tue, 12 Feb 2019 23:01:16 +0000 (23:01 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Tue, 12 Feb 2019 23:01:33 +0000 (23:01 +0000)
binutils allows you to set ld=ld.bfd (default) and ld=ld.gold.

Expose this override as USE=default-gold.

Reported-by: Marcin Mirosław
Bug: https://bugs.gentoo.org/496760
Package-Manager: Portage-2.3.60, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
sys-devel/binutils/binutils-2.31.1-r3.ebuild
sys-devel/binutils/binutils-9999.ebuild
sys-devel/binutils/metadata.xml

index 0ba64dc35a0a4bca2bf70b4b6836afc727a9f445..ef47b02deafeeb5a709ae0028a7335db62d24345 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -8,7 +8,8 @@ inherit eutils libtool flag-o-matic gnuconfig multilib versionator
 DESCRIPTION="Tools necessary to build programs"
 HOMEPAGE="https://sourceware.org/binutils/"
 LICENSE="GPL-3+"
-IUSE="+cxx doc multitarget +nls static-libs test"
+IUSE="+cxx default-gold doc multitarget +nls static-libs test"
+REQUIRED_USE="default-gold? ( cxx )"
 
 # Variables that can be set here:
 # PATCH_VER          - the patchset version
@@ -179,6 +180,9 @@ src_configure() {
        if use cxx ; then
                myconf+=( --enable-gold )
                myconf+=( --enable-plugins )
+               if use default-gold; then
+                       myconf+=( --enable-gold=default )
+               fi
        fi
 
        if use nls ; then
index 5e72d97d1403f5f7f7d6d6c4be488bbfe933da59..4e2bb0f4ec753d9d421597e3394033b800679b7a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -178,6 +178,9 @@ src_configure() {
        if use cxx ; then
                myconf+=( --enable-gold )
                myconf+=( --enable-plugins )
+               if use default-gold; then
+                       myconf+=( --enable-gold=default )
+               fi
        fi
 
        if use nls ; then
index cd119b3491c32606776059428f848b9ff60c01a9..98c985e11c4af89210c4c45affea98a66f49625c 100644 (file)
@@ -6,6 +6,7 @@
                <name>Gentoo Toolchain Project</name>
        </maintainer>
        <use>
+               <flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
                <flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
        </use>
        <upstream>