From 00e09cb2e22e0ea595273389a9de4ec5c1c0ddb5 Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Mon, 30 May 2022 22:47:15 +0200 Subject: [PATCH] package/gtest: gmock needs host gcc >= 4.9 gtest unconditionally uses is_trivially_copy_constructible since version 1.11.0 and https://github.com/google/googletest/commit/c13c27a513ecd1cbf5700a45fe590e85e8ae6770 So add a dependency on host gcc >= 4.9 for gmock to avoid the following build failure since commit 9dfbbbb4105c47602da048c9bb9499fb8862e768: In file included from /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/build/host-gtest-1.11.0/googletest/include/gtest/internal/gtest-death-test-internal.h:39:0, from /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/build/host-gtest-1.11.0/googletest/include/gtest/gtest-death-test.h:41, from /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/build/host-gtest-1.11.0/googletest/include/gtest/gtest.h:64, from /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/build/host-gtest-1.11.0/googletest/src/gtest-all.cc:38: /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/build/host-gtest-1.11.0/googletest/include/gtest/gtest-matchers.h: In static member function 'static constexpr bool testing::internal::MatcherBase::IsInlined()': /usr/lfs/hdd_v1/rc-buildroot-test/scripts/instance-1/output-1/build/host-gtest-1.11.0/googletest/include/gtest/gtest-matchers.h:414:12: error: 'is_trivially_copy_constructible' is not a member of 'std' std::is_trivially_copy_constructible::value && ^ Fixes: - http://autobuild.buildroot.org/results/9d19a47deb80824eaa718d80f14b0afd5f9eb054 Signed-off-by: Fabrice Fontaine Signed-off-by: Yann E. MORIN (cherry picked from commit 480d76342df775fe36d987f597224fd7cfa18111) Signed-off-by: Peter Korsgaard --- package/gtest/Config.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/gtest/Config.in b/package/gtest/Config.in index d8bcf6343f..35fc9fea7b 100644 --- a/package/gtest/Config.in +++ b/package/gtest/Config.in @@ -26,6 +26,7 @@ if BR2_PACKAGE_GTEST config BR2_PACKAGE_GTEST_GMOCK bool "gmock" + depends on BR2_HOST_GCC_AT_LEAST_4_9 # host-gtest help Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s specifics in mind, Google C++ Mocking Framework (or @@ -47,6 +48,9 @@ config BR2_PACKAGE_GTEST_GMOCK libraries required to link/run them. The host package installs gmock_gen, a Python script used to generate code mocks. +comment "gmock needs host gcc >= 4.9" + depends on !BR2_HOST_GCC_AT_LEAST_4_9 + endif # BR2_PACKAGE_GTEST comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"