Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/
Date: Fri, 21 Jan 2022 20:29:27
Message-Id: 1642796953.4e030d26df9349efddf8eb97d919911e593aaaa9.sam@gentoo
1 commit: 4e030d26df9349efddf8eb97d919911e593aaaa9
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 21 20:19:29 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 21 20:29:13 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e030d26
7
8 sys-devel/binutils: add USE=pgo for 2.37_p1-r2
9
10 Added upstream in 2.37, actually, but we'd missed it! Realised after seeing
11 the sync commit for GCC.
12
13 Sets --enable-pgo-build=lto if USE=pgo is set.
14
15 Throws in LTO for the PGO build too given it's cleaner than
16 e.g. having a USE=lto which only works when USE=pgo is also set,
17 REQUIRED_USE, or other nonsense.
18
19 Signed-off-by: Sam James <sam <AT> gentoo.org>
20
21 sys-devel/binutils/binutils-2.37_p1-r2.ebuild | 4 +++-
22 sys-devel/binutils/binutils-9999.ebuild | 4 +++-
23 sys-devel/binutils/metadata.xml | 1 +
24 3 files changed, 7 insertions(+), 2 deletions(-)
25
26 diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
27 index cfdd2538eefe..c7c57aefb044 100644
28 --- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
29 +++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
30 @@ -8,7 +8,7 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
31 DESCRIPTION="Tools necessary to build programs"
32 HOMEPAGE="https://sourceware.org/binutils/"
33 LICENSE="GPL-3+"
34 -IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
35 +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
36 REQUIRED_USE="default-gold? ( gold )"
37
38 # Variables that can be set here (ignored for live ebuilds)
39 @@ -272,6 +272,8 @@ src_configure() {
40 # Ideally we would like automagic-or-disabled here.
41 # But the check does not quite work on i686: bug #760926.
42 $(use_enable cet)
43 +
44 + $(use_enable pgo pgo-build lto)
45 )
46 echo ./configure "${myconf[@]}"
47 "${S}"/configure "${myconf[@]}" || die
48
49 diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
50 index 2609713b2a04..d53c8d446235 100644
51 --- a/sys-devel/binutils/binutils-9999.ebuild
52 +++ b/sys-devel/binutils/binutils-9999.ebuild
53 @@ -8,7 +8,7 @@ inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
54 DESCRIPTION="Tools necessary to build programs"
55 HOMEPAGE="https://sourceware.org/binutils/"
56 LICENSE="GPL-3+"
57 -IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
58 +IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
59 REQUIRED_USE="default-gold? ( gold )"
60
61 # Variables that can be set here (ignored for live ebuilds)
62 @@ -273,6 +273,8 @@ src_configure() {
63 # Ideally we would like automagic-or-disabled here.
64 # But the check does not quite work on i686: bug #760926.
65 $(use_enable cet)
66 +
67 + $(use_enable pgo pgo-build lto)
68 )
69 echo ./configure "${myconf[@]}"
70 "${S}"/configure "${myconf[@]}" || die
71
72 diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
73 index 4f6990c6d6f9..e05bf0bdd552 100644
74 --- a/sys-devel/binutils/metadata.xml
75 +++ b/sys-devel/binutils/metadata.xml
76 @@ -9,6 +9,7 @@
77 <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
78 <flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
79 <flag name="gold">Build ld.gold linker</flag>
80 + <flag name="pgo">Build binutils with Profile Guided Optimization (PGO) and LTO</flag>
81 <flag name="plugins">Enable plugin support in tools</flag>
82 <flag name="multitarget">Adds support to binutils for cross compiling (does not work with gas)</flag>
83 </use>