diff options
author | Peter Levine <plevine457@gmail.com> | 2024-06-17 21:38:20 -0400 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-18 03:08:52 +0100 |
commit | 5037161d1847e7b51fac52e304fb120682455d8b (patch) | |
tree | 2dcdcf528b4364fbadc062329cdd278485600171 /dev-cpp/gtest | |
parent | dev-cpp/gtest: fix test failure with -O2/-O3 on arm hardfloat arch (diff) | |
download | gentoo-5037161d1847e7b51fac52e304fb120682455d8b.tar.gz gentoo-5037161d1847e7b51fac52e304fb120682455d8b.tar.bz2 gentoo-5037161d1847e7b51fac52e304fb120682455d8b.zip |
dev-cpp/gtest: fix test failure on x86
Testing on x86 architecture causes a unittest to fail due to
a floating-point precision discrepancy. Like Debian, we add
-ffloat-store until upstream addresses the issue.
Closes: https://bugs.gentoo.org/905007
Closes: https://github.com/gentoo/gentoo/pull/37191
Suggested-by: Sam James <sam@gentoo.org>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-cpp/gtest')
-rw-r--r-- | dev-cpp/gtest/gtest-1.14.0-r1.ebuild | 7 | ||||
-rw-r--r-- | dev-cpp/gtest/gtest-9999.ebuild | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/dev-cpp/gtest/gtest-1.14.0-r1.ebuild b/dev-cpp/gtest/gtest-1.14.0-r1.ebuild index aed50c96f6e4..ecb89314e216 100644 --- a/dev-cpp/gtest/gtest-1.14.0-r1.ebuild +++ b/dev-cpp/gtest/gtest-1.14.0-r1.ebuild @@ -51,7 +51,12 @@ multilib_src_configure() { -Dgmock_build_tests=$(usex test) -Dgtest_build_tests=$(usex test) ) - use test && mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" ) + if use test; then + if use x86 || use x86-linux; then + append-cxxflags -ffloat-store # bug #905007 + fi + mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" ) + fi cmake_src_configure } diff --git a/dev-cpp/gtest/gtest-9999.ebuild b/dev-cpp/gtest/gtest-9999.ebuild index aed50c96f6e4..ecb89314e216 100644 --- a/dev-cpp/gtest/gtest-9999.ebuild +++ b/dev-cpp/gtest/gtest-9999.ebuild @@ -51,7 +51,12 @@ multilib_src_configure() { -Dgmock_build_tests=$(usex test) -Dgtest_build_tests=$(usex test) ) - use test && mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" ) + if use test; then + if use x86 || use x86-linux; then + append-cxxflags -ffloat-store # bug #905007 + fi + mycmakeargs+=( -DPython3_EXECUTABLE="${PYTHON}" ) + fi cmake_src_configure } |