From 81d08d797059c4af633c48048dbcd97de4a01a12 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 21 May 2024 09:25:07 +0300 Subject: gnu: abseil-cpp: Fix build on i686-linux. * gnu/packages/cpp.scm (abseil-cpp)[source]: Add patch. (abseil-cpp-20220623.1)[source]: Same. * gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: I27b9abc2c44ff6dc313209f4b0b12542a92d6fcd --- .../abseil-cpp-20220623.1-no-kepsilon-i686.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch b/gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch new file mode 100644 index 0000000000..ba4e27511b --- /dev/null +++ b/gnu/packages/patches/abseil-cpp-20220623.1-no-kepsilon-i686.patch @@ -0,0 +1,23 @@ +After an upstream code dump on 20220314 when this code was added this test started to fail on i686-linux. + +diff --git a/absl/random/uniform_real_distribution_test.cc b/absl/random/uniform_real_distribution_test.cc +index 260aac96..0abef9b0 100644 +--- a/absl/random/uniform_real_distribution_test.cc ++++ b/absl/random/uniform_real_distribution_test.cc +@@ -228,6 +228,8 @@ TYPED_TEST(UniformRealDistributionTest, ViolatesPreconditionsDeathTest) { + + #endif // GTEST_HAS_DEATH_TEST + #if defined(NDEBUG) ++ // Except apparently not with 387 math ++#if !((defined(__i386__) || defined(_M_IX86)) && FLT_EVAL_METHOD != 0) + // opt-mode, for invalid parameters, will generate a garbage value, + // but should not enter an infinite loop. + absl::InsecureBitGen gen; +@@ -243,6 +245,7 @@ TYPED_TEST(UniformRealDistributionTest, ViolatesPreconditionsDeathTest) { + // Infinite result. + EXPECT_FALSE(std::isfinite(x)) << x; + } ++#endif // skip on i386 + #endif // NDEBUG + } + #ifdef _MSC_VER -- cgit 1.4.1