summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-01-21 20:19:29 +0000
committerSam James <sam@gentoo.org>2022-01-21 20:29:13 +0000
commit4e030d26df9349efddf8eb97d919911e593aaaa9 (patch)
treec5d87335c56b705cbf49b59b6712ff776c044769
parentnet-ftp/proftpd: Stabilize 1.3.8_rc2 ppc, #831645 (diff)
downloadgentoo-4e030d26.tar.gz
gentoo-4e030d26.tar.bz2
gentoo-4e030d26.zip
sys-devel/binutils: add USE=pgo for 2.37_p1-r2
Added upstream in 2.37, actually, but we'd missed it! Realised after seeing the sync commit for GCC. Sets --enable-pgo-build=lto if USE=pgo is set. Throws in LTO for the PGO build too given it's cleaner than e.g. having a USE=lto which only works when USE=pgo is also set, REQUIRED_USE, or other nonsense. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-devel/binutils/binutils-2.37_p1-r2.ebuild4
-rw-r--r--sys-devel/binutils/binutils-9999.ebuild4
-rw-r--r--sys-devel/binutils/metadata.xml1
3 files changed, 7 insertions, 2 deletions
diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
index cfdd2538eefe..c7c57aefb044 100644
--- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
@@ -8,7 +8,7 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -272,6 +272,8 @@ src_configure() {
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
+
+ $(use_enable pgo pgo-build lto)
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
index 2609713b2a04..d53c8d446235 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -8,7 +8,7 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -273,6 +273,8 @@ src_configure() {
# Ideally we would like automagic-or-disabled here.
# But the check does not quite work on i686: bug #760926.
$(use_enable cet)
+
+ $(use_enable pgo pgo-build lto)
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
index 4f6990c6d6f9..e05bf0bdd552 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -9,6 +9,7 @@
<flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
<flag name="gold">Build ld.gold linker</flag>
+ <flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
<flag name="plugins">Enable plugin support in tools</flag>
<flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
</use>