commit:     5bad5a170adc6e83b7943d7469b69535a6aee886
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 21 23:24:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 21 23:42:59 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bad5a17

sys-devel/binutils: respect CFLAGS for PGO

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/binutils/binutils-2.37_p1-r2.ebuild | 5 +++++
 sys-devel/binutils/binutils-9999.ebuild       | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild 
b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
index c7c57aefb044..bbcd261cef45 100644
--- a/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.37_p1-r2.ebuild
@@ -275,6 +275,11 @@ src_configure() {
 
                $(use_enable pgo pgo-build lto)
        )
+
+       if use pgo ; then
+               export BUILD_CFLAGS="${CFLAGS}"
+       fi
+
        echo ./configure "${myconf[@]}"
        "${S}"/configure "${myconf[@]}" || die
 

diff --git a/sys-devel/binutils/binutils-9999.ebuild 
b/sys-devel/binutils/binutils-9999.ebuild
index d53c8d446235..d79e91c3cff1 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -276,6 +276,11 @@ src_configure() {
 
                $(use_enable pgo pgo-build lto)
        )
+
+       if use pgo ; then
+               export BUILD_CFLAGS="${CFLAGS}"
+       fi
+
        echo ./configure "${myconf[@]}"
        "${S}"/configure "${myconf[@]}" || die
 

Reply via email to