From 90a9900abb79fabfd44189a959d14ca677c2777a Mon Sep 17 00:00:00 2001 From: James Zern <jzern@google.com> Date: Tue, 18 Jun 2013 19:19:20 -0700 Subject: [PATCH] test_libvpx: disable pthreads in gtest currently threading is internal to libvpx so thread safety is unneeded in libgtest -- visual studio builds already operate in this way as they do not have pthread.h available by default. this removes an unconditional link to libpthread using $(extralibs) should libvpx require it. Change-Id: Ieae1d693406653a54b54fba818c598836797d33b --- configure | 2 +- libs.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 28676fbc6c..1ac018ca28 100755 --- a/configure +++ b/configure @@ -683,7 +683,7 @@ process_toolchain() { # x86 targets. ;; *) - enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests + check_cxx "$@" <<EOF && soft_enable unit_tests int z; EOF ;; diff --git a/libs.mk b/libs.mk index f7ed95bce5..5b364d983b 100644 --- a/libs.mk +++ b/libs.mk @@ -442,6 +442,7 @@ else include $(SRC_PATH_BARE)/third_party/googletest/gtest.mk GTEST_SRCS := $(addprefix third_party/googletest/src/,$(call enabled,GTEST_SRCS)) GTEST_OBJS=$(call objs,$(GTEST_SRCS)) +$(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -DGTEST_HAS_PTHREAD=0 $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src $(GTEST_OBJS) $(GTEST_OBJS:.o=.d): CXXFLAGS += -I$(SRC_PATH_BARE)/third_party/googletest/src/include OBJS-$(BUILD_LIBVPX) += $(GTEST_OBJS) @@ -466,7 +467,7 @@ $(foreach bin,$(LIBVPX_TEST_BINS),\ lib$(CODEC_LIB)$(CODEC_LIB_SUF) libgtest.a ))\ $(if $(BUILD_LIBVPX),$(eval $(call linkerxx_template,$(bin),\ $(LIBVPX_TEST_OBJS) \ - -L. -lvpx -lgtest -lpthread -lm)\ + -L. -lvpx -lgtest $(extralibs) -lm)\ )))\ $(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\ -- GitLab