From bc56495544b69df93fd54ea44c5f03841bae027f Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 28 Jan 2022 22:07:15 +0000 Subject: sys-devel/binutils: really fix PGO for cross (disable it) Closes: https://bugs.gentoo.org/832174 Fixes: 57737c9f2a9ce3e1b2492760e98932b7b9f9eea2 Signed-off-by: Sam James --- sys-devel/binutils/binutils-2.37_p1-r2.ebuild | 11 +++++++++-- sys-devel/binutils/binutils-9999.ebuild | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'sys-devel/binutils') diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild index bea3128e217f..5a182867fab3 100644 --- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild +++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild @@ -272,10 +272,17 @@ 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) ) + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + if use pgo && ! is_cross ; then export BUILD_CFLAGS="${CFLAGS}" fi diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild index b7af0845fd0a..3fdfdf479f26 100644 --- a/sys-devel/binutils/binutils-9999.ebuild +++ b/sys-devel/binutils/binutils-9999.ebuild @@ -273,10 +273,17 @@ 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) ) + if ! is_cross ; then + myconf+=( $(use_enable pgo pgo-build lto) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi + fi + + if use pgo && ! is_cross ; then export BUILD_CFLAGS="${CFLAGS}" fi -- cgit v1.2.3-65-gdbad