Index: lib/googletest/gtest_main/tests/Makefile =================================================================== --- lib/googletest/gtest_main/tests/Makefile +++ lib/googletest/gtest_main/tests/Makefile @@ -1,6 +1,7 @@ # $FreeBSD$ .include +.include .PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test @@ -20,7 +21,13 @@ GTESTS+= gtest-typed-test_test GTESTS+= gtest_skip_test GTESTS+= gtest_skip_in_environment_setup_test +.if ${COMPILER_TYPE} != "gcc" || ${COMPILER_VERSION} >= 100000 +# gtest_unittest uses ostreams in some way that external gcc will not cope +# with at the moment, leading to build failures. Don't build it for now on +# gcc9 and lower, and we can re-evaluate this with newer versions of gcc as +# well as newer versions of googletest. GTESTS+= gtest_unittest +.endif CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include CXXFLAGS+= -I${GOOGLETEST_SRCROOT} Index: lib/libcompiler_rt/Makefile =================================================================== --- lib/libcompiler_rt/Makefile +++ lib/libcompiler_rt/Makefile @@ -12,6 +12,11 @@ CFLAGS+= -DVISIBILITY_HIDDEN CFLAGS+= -I${SRCTOP}/contrib/libcxxrt +# mips-gcc attempts to use this in the googletest build, so presumably it's +# expecting it not to be hidden as it currently is. Build floatunsidf.c with +# default visibility instead. +CFLAGS.floatunsidf.c= -fvisibility=default + # gcc has incompatible internal declarations for __divtc3 and __multc3, but has # no option to silence its warning, so make warnings non-fatal. NO_WERROR.gcc=