]> granicus.if.org Git - libvpx/commitdiff
Revert "test_libvpx: disable pthreads in gtest"
authorJames Zern <jzern@google.com>
Thu, 20 Jun 2013 19:49:15 +0000 (12:49 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Thu, 20 Jun 2013 19:49:15 +0000 (12:49 -0700)
This reverts commit 90a9900abb79fabfd44189a959d14ca677c2777a

Seems to break the Mac build:
src/include/gtest/internal/gtest-port.h:1208:: pthread_mutex_lock(&mutex_)failed with error 22
Abort trap: 6

Change-Id: Icbe31161d7c27f1b0a28d33409e7712430bbf0ae

configure
libs.mk

index 1ac018ca28a3dfc5505191315bfa8f9a295f1507..28676fbc6c3a6e99134969b7ddd6e2052a6f08e5 100755 (executable)
--- a/configure
+++ b/configure
@@ -683,7 +683,7 @@ process_toolchain() {
             # x86 targets.
         ;;
         *)
-            check_cxx "$@" <<EOF && soft_enable unit_tests
+            enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests
 int z;
 EOF
         ;;
diff --git a/libs.mk b/libs.mk
index 5b364d983bb6bf16650e9e1c82a427120045406f..f7ed95bce5c3887bedd145f20f07cc4011ce3ca4 100644 (file)
--- a/libs.mk
+++ b/libs.mk
@@ -442,7 +442,6 @@ 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)
@@ -467,7 +466,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 $(extralibs) -lm)\
+        -L. -lvpx -lgtest -lpthread -lm)\
         )))\
     $(if $(LIPO_LIBS),$(eval $(call lipo_bin_template,$(bin))))\