public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: eclass/, dev-lang/gnat-gpl/, sys-devel/gcc/
@ 2017-09-24 18:08 Sergei Trofimovich
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2017-09-24 18:08 UTC (permalink / raw
  To: gentoo-commits

commit:     0591d59df6a846750c267e34a28b8b8d87812101
Author:     Shane Peelar <lookatyouhacker <AT> gmail <DOT> com>
AuthorDate: Wed Sep 20 15:59:20 2017 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Sep 24 18:06:15 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0591d59d

sys-devel/gcc: add a USE for building GCC with PGO

Package-Manager: Portage-2.3.10, Repoman-2.3.3
Closes: https://github.com/gentoo/gentoo/pull/5741

 dev-lang/gnat-gpl/metadata.xml | 1 +
 eclass/toolchain.eclass        | 7 ++++++-
 sys-devel/gcc/metadata.xml     | 1 +
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/dev-lang/gnat-gpl/metadata.xml b/dev-lang/gnat-gpl/metadata.xml
index 93f13769808..5018efb098a 100644
--- a/dev-lang/gnat-gpl/metadata.xml
+++ b/dev-lang/gnat-gpl/metadata.xml
@@ -26,6 +26,7 @@
 		<flag name="objc++">Build support for the Objective C++ language</flag>
 		<flag name="objc-gc">Build support for the Objective C code language
 			Garbage Collector</flag>
+		<flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag>
 		<flag name="regression-test">Run the testsuite and install the results
 			(requires FEATURES=test)</flag>
 		<flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag>

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index baffa39bda9..a18e8042641 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -139,6 +139,7 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
 	[[ -n ${D_VER}   ]] && IUSE+=" d"
 	[[ -n ${SPECS_VER} ]] && IUSE+=" nossp"
 	tc_version_is_at_least 3 && IUSE+=" doc gcj awt hardened multilib objc"
+	tc_version_is_at_least 3.3 && IUSE+=" pgo"
 	tc_version_is_at_least 4.0 && IUSE+=" objc-gc"
 	tc_version_is_between 4.0 4.9 && IUSE+=" mudflap"
 	tc_version_is_at_least 4.1 && IUSE+=" libssp objc++"
@@ -1569,7 +1570,11 @@ gcc_do_make() {
 		# resulting binaries natively ^^;
 		GCC_MAKE_TARGET=${GCC_MAKE_TARGET-all}
 	else
-		GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean}
+		if tc_version_is_at_least 3.3 && use pgo; then
+			GCC_MAKE_TARGET=${GCC_MAKE_TARGET-profiledbootstrap}
+		else
+			GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean}
+		fi
 	fi
 
 	# Older versions of GCC could not do profiledbootstrap in parallel due to

diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
index 43abab038eb..52748bc1ff6 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -27,6 +27,7 @@
     <flag name="objc++">Build support for the Objective C++ language</flag>
     <flag name="objc-gc">Build support for the Objective C code language Garbage
       Collector</flag>
+    <flag name="pgo">Build GCC using Profile Guided Optimization (PGO)</flag>
     <flag name="regression-test">Run the testsuite and install the results (requires FEATURES=test)</flag>
     <flag name="sanitize">Build support for various sanitizer functions (ASAN/TSAN/etc...)</flag>
     <flag name="ssp">Build packages with stack smashing protector on by default</flag>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-09-24 18:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-24 18:08 [gentoo-commits] repo/gentoo:master commit in: eclass/, dev-lang/gnat-gpl/, sys-devel/gcc/ Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox