summaryrefslogtreecommitdiff
path: root/sys-devel/binutils/binutils-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-09 18:44:29 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-09 18:44:29 +0000
commitdc41efad78c64df9b74ed6f94dcf25391b8fc5e1 (patch)
tree0e9943dbba2f7bc3f723f1e68720b1500c61ac94 /sys-devel/binutils/binutils-9999.ebuild
parent20d4435a7d9459953db77f3256f699f420d3e484 (diff)
gentoo auto-resync : 09:03:2024 - 18:44:28
Diffstat (limited to 'sys-devel/binutils/binutils-9999.ebuild')
-rw-r--r--sys-devel/binutils/binutils-9999.ebuild32
1 files changed, 28 insertions, 4 deletions
diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
index 9169e3ca712c..9b30843ce94f 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -333,10 +333,20 @@ src_configure() {
)
fi
+ if use test || { use pgo && tc-is-lto ; } ; then
+ # -Wa,* needs to be consistent everywhere or lto-wrapper will complain
+ filter-flags '-Wa,*'
+ fi
+
if ! is_cross ; then
- myconf+=( $(use_enable pgo pgo-build lto) )
+ myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) )
if use pgo ; then
+ # We let configure handle it for us because it has to run
+ # the testsuite later on for profiling, and LTO isn't compatible
+ # with the testsuite.
+ filter-lto
+
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
@@ -378,10 +388,24 @@ src_test() {
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
- # bug #637066
- filter-flags -Wall -Wreturn-type
+ (
+ # Tests don't expect LTO
+ filter-lto
- emake -k check
+ # lto-wrapper warnings which confuse tests
+ filter-flags '-Wa,*'
+
+ # bug #637066
+ filter-flags -Wall -Wreturn-type
+
+ emake -k check \
+ CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
+ CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
+ LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
+ CFLAGS="${CFLAGS}" \
+ CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+ )
}
src_install() {