diff --git a/fea3dba9cfec3a74ddcd8ecac3a5d4d8429191e4.patch b/fea3dba9cfec3a74ddcd8ecac3a5d4d8429191e4.patch new file mode 100644 index 0000000..d41bf70 --- /dev/null +++ b/fea3dba9cfec3a74ddcd8ecac3a5d4d8429191e4.patch @@ -0,0 +1,36 @@ +From fea3dba9cfec3a74ddcd8ecac3a5d4d8429191e4 Mon Sep 17 00:00:00 2001 +From: Mathieu Malaterre +Date: Wed, 13 Sep 2023 10:43:58 +0200 +Subject: [PATCH] Workaround issue on ppc64el with LTO + +Related to #1739 +--- + hwy/contrib/math/math_test.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/hwy/contrib/math/math_test.cc b/hwy/contrib/math/math_test.cc +index ae4a961b71..6e218b8fec 100644 +--- a/hwy/contrib/math/math_test.cc ++++ b/hwy/contrib/math/math_test.cc +@@ -161,8 +161,8 @@ HWY_NOINLINE void TestMath(const char* name, T (*fx1)(T), + DEFINE_MATH_TEST_FUNC(NAME) + + // Floating point values closest to but less than 1.0 +-const float kNearOneF = BitCast(0x3F7FFFFF); +-const double kNearOneD = BitCast(0x3FEFFFFFFFFFFFFFULL); ++float kNearOneF() { return BitCast(0x3F7FFFFF); } ++double kNearOneD() { return BitCast(0x3FEFFFFFFFFFFFFFULL); } + + // The discrepancy is unacceptably large for MSYS2 (less accurate libm?), so + // only increase the error tolerance there. +@@ -230,8 +230,8 @@ DEFINE_MATH_TEST(Atan, + std::atan, CallAtan, -FLT_MAX, +FLT_MAX, 3, + std::atan, CallAtan, -DBL_MAX, +DBL_MAX, 3) + DEFINE_MATH_TEST(Atanh, +- std::atanh, CallAtanh, -kNearOneF, +kNearOneF, 4, // NEON is 4 instead of 3 +- std::atanh, CallAtanh, -kNearOneD, +kNearOneD, 3) ++ std::atanh, CallAtanh, -kNearOneF(), +kNearOneF(), 4, // NEON is 4 instead of 3 ++ std::atanh, CallAtanh, -kNearOneD(), +kNearOneD(), 3) + DEFINE_MATH_TEST(Cos, + std::cos, CallCos, -39000.0f, +39000.0f, 3, + std::cos, CallCos, -39000.0, +39000.0, Cos64ULP()) diff --git a/highway.changes b/highway.changes index c5fa11a..a658e94 100644 --- a/highway.changes +++ b/highway.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 14 14:17:36 CET 2025 - ro@suse.de + +- add fea3dba9cfec3a74ddcd8ecac3a5d4d8429191e4.patch + fix LTO issue on ppc64le causing illegal instruction + in math_test (bsc#1235849) + (patch is part of upstream since 1.1.0 release) + ------------------------------------------------------------------- Fri Sep 22 01:30:49 UTC 2023 - Jan Engelhardt diff --git a/highway.spec b/highway.spec index 6c0acf2..dc7b4dd 100644 --- a/highway.spec +++ b/highway.spec @@ -28,6 +28,7 @@ URL: https://github.com/google/highway Source: https://github.com/google/highway/archive/refs/tags/%version.tar.gz Source1: baselibs.conf Patch1: no-forced-inline.diff +Patch2: fea3dba9cfec3a74ddcd8ecac3a5d4d8429191e4.patch # https://github.com/google/highway/issues/776 %if 0%{?suse_version} > 1550 BuildRequires: c++_compiler