commit:     776969159e324d95db67dec1e3137d59792f02b5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  4 22:41:53 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Mar  4 22:42:18 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77696915

sys-devel/binutils: filter -mfpmath=* out of tests

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.

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

 sys-devel/binutils/binutils-2.44.9999.ebuild | 10 ++++++++++
 sys-devel/binutils/binutils-2.44.ebuild      | 10 ++++++++++
 sys-devel/binutils/binutils-9999.ebuild      | 10 ++++++++++
 3 files changed, 30 insertions(+)

diff --git a/sys-devel/binutils/binutils-2.44.9999.ebuild 
b/sys-devel/binutils/binutils-2.44.9999.ebuild
index f6894326484b..3c840be5f3ee 100644
--- a/sys-devel/binutils/binutils-2.44.9999.ebuild
+++ b/sys-devel/binutils/binutils-2.44.9999.ebuild
@@ -398,6 +398,16 @@ src_test() {
                # 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,*'
 

diff --git a/sys-devel/binutils/binutils-2.44.ebuild 
b/sys-devel/binutils/binutils-2.44.ebuild
index 6628fbed5bce..518fd3c702af 100644
--- a/sys-devel/binutils/binutils-2.44.ebuild
+++ b/sys-devel/binutils/binutils-2.44.ebuild
@@ -398,6 +398,16 @@ src_test() {
                # 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,*'
 

diff --git a/sys-devel/binutils/binutils-9999.ebuild 
b/sys-devel/binutils/binutils-9999.ebuild
index bf8d3eccb26f..65d9f15ce0f0 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -398,6 +398,16 @@ src_test() {
                # 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,*'
 

Reply via email to