commit: f58b8c8536d5e5f8453fcf7e04f2505b2a627a67 Author: Peter Levine <plevine457 <AT> gmail <DOT> com> AuthorDate: Mon Jun 17 06:18:59 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Jun 18 02:08:52 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f58b8c85
dev-cpp/gtest: fix test failure with -O2/-O3 on arm hardfloat arch Testing on arm hardfloat architecture with -O2/-O3 causes a unittest to fail. Do like Debian does and replace with -O1 until upstream addresses it. Closes: https://bugs.gentoo.org/925093 Suggested-by: Sam James <sam <AT> gentoo.org> Signed-off-by: Peter Levine <plevine457 <AT> gmail.com> Signed-off-by: Sam James <sam <AT> gentoo.org> dev-cpp/gtest/{gtest-9999.ebuild => gtest-1.14.0-r1.ebuild} | 6 +++++- dev-cpp/gtest/gtest-9999.ebuild | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dev-cpp/gtest/gtest-9999.ebuild b/dev-cpp/gtest/gtest-1.14.0-r1.ebuild similarity index 90% copy from dev-cpp/gtest/gtest-9999.ebuild copy to dev-cpp/gtest/gtest-1.14.0-r1.ebuild index 175fed22f13f..aed50c96f6e4 100644 --- a/dev-cpp/gtest/gtest-9999.ebuild +++ b/dev-cpp/gtest/gtest-1.14.0-r1.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Python is required for tests and some build tasks. PYTHON_COMPAT=( python3_{10..13} ) -inherit cmake-multilib python-any-r1 +inherit cmake-multilib flag-o-matic python-any-r1 toolchain-funcs if [[ ${PV} == "9999" ]]; then inherit git-r3 @@ -39,6 +39,10 @@ pkg_setup() { } multilib_src_configure() { + if use arm && [[ $(tc-is-softfloat) =~ (softfp)|(no) ]]; then + replace-flags -O* -O1 # bug #925093 + fi + local mycmakeargs=( -DBUILD_GMOCK=ON -DINSTALL_GTEST=ON diff --git a/dev-cpp/gtest/gtest-9999.ebuild b/dev-cpp/gtest/gtest-9999.ebuild index 175fed22f13f..aed50c96f6e4 100644 --- a/dev-cpp/gtest/gtest-9999.ebuild +++ b/dev-cpp/gtest/gtest-9999.ebuild @@ -6,7 +6,7 @@ EAPI=8 # Python is required for tests and some build tasks. PYTHON_COMPAT=( python3_{10..13} ) -inherit cmake-multilib python-any-r1 +inherit cmake-multilib flag-o-matic python-any-r1 toolchain-funcs if [[ ${PV} == "9999" ]]; then inherit git-r3 @@ -39,6 +39,10 @@ pkg_setup() { } multilib_src_configure() { + if use arm && [[ $(tc-is-softfloat) =~ (softfp)|(no) ]]; then + replace-flags -O* -O1 # bug #925093 + fi + local mycmakeargs=( -DBUILD_GMOCK=ON -DINSTALL_GTEST=ON
