package/gtest: gmock needs host gcc >= 4.9

gtest unconditionally uses is_trivially_copy_constructible since
version 1.11.0 and
c13c27a513

So add a dependency on host gcc >= 4.9 for gmock to avoid the following
build failure since commit 9dfbbbb410:

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<T>::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<M>::value &&
            ^

Fixes:
 - http://autobuild.buildroot.org/results/9d19a47deb80824eaa718d80f14b0afd5f9eb054

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Fabrice Fontaine 2022-05-30 22:47:15 +02:00 committed by Yann E. MORIN
parent f255a32211
commit 480d76342d

View File

@ -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"