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>
This commit is contained in:
Sam James
2022-01-21 20:29:13 +00:00
parent 9a1a5d8b33
commit 4e030d26df
3 changed files with 7 additions and 2 deletions
@@ -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
+3 -1
View File
@@ -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
+1
View File
@@ -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>