sys-libs/binutils-libs: Sync with Gentoo

It's from Gentoo commit 44505befae975f59ae48b194c4aa06dd0e312c7f.
This commit is contained in:
Flatcar Buildbot 2025-07-07 07:15:17 +00:00
parent d20ca84081
commit 510c62f152
2 changed files with 64 additions and 8 deletions

View File

@ -3,7 +3,7 @@
EAPI=8
inherit dot-a libtool toolchain-funcs multilib-minimal
inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
HOMEPAGE="https://sourceware.org/binutils/"
@ -208,9 +208,37 @@ multilib_src_configure() {
}
multilib_src_test() {
# Without this, the default `src_test` check for the 'check' target
# with `-n` may fail with parallel make and silently skip tests (bug #955595)
emake check
(
# Tests don't expect LTO
filter-lto
# If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
# we'll get lto1 warnings for some tests which cause
# spurious failures because -mfpmath isn't passed at
# link-time. Filter accordingly.
#
# Alternatively, we could pass C{C,XX}_FOR_TARGET with
# some (ideally not all, surely would break some tests)
# stuffed in.
filter-flags '-mfpmath=*'
# lto-wrapper warnings which confuse tests
filter-flags '-Wa,*'
# bug #637066
filter-flags -Wall -Wreturn-type
# Note that we need 'check' explicitly if ever cleaning this
# up: the default `src_test` check for the 'check' target
# with `-n` may fail with parallel make and silently skip tests (bug #955595)
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}"
)
}
multilib_src_install() {

View File

@ -3,7 +3,7 @@
EAPI=8
inherit dot-a libtool toolchain-funcs multilib-minimal
inherit dot-a flag-o-matic libtool toolchain-funcs multilib-minimal
DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages"
HOMEPAGE="https://sourceware.org/binutils/"
@ -208,9 +208,37 @@ multilib_src_configure() {
}
multilib_src_test() {
# Without this, the default `src_test` check for the 'check' target
# with `-n` may fail with parallel make and silently skip tests (bug #955595)
emake check
(
# Tests don't expect LTO
filter-lto
# If we have e.g. -mfpmath=sse -march=pentium4 in CFLAGS,
# we'll get lto1 warnings for some tests which cause
# spurious failures because -mfpmath isn't passed at
# link-time. Filter accordingly.
#
# Alternatively, we could pass C{C,XX}_FOR_TARGET with
# some (ideally not all, surely would break some tests)
# stuffed in.
filter-flags '-mfpmath=*'
# lto-wrapper warnings which confuse tests
filter-flags '-Wa,*'
# bug #637066
filter-flags -Wall -Wreturn-type
# Note that we need 'check' explicitly if ever cleaning this
# up: the default `src_test` check for the 'check' target
# with `-n` may fail with parallel make and silently skip tests (bug #955595)
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}"
)
}
multilib_src_install() {