From 3976eb17d0b22e0c8735b90da5a5cc4342243088 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 7 Apr 2016 15:21:55 -0400 Subject: [PATCH] FS-8623: fix sun studio build errors building libvpx --- Makefile.am | 2 +- configure.ac | 10 ++++++++++ libs/libvpx/libs.mk | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index c029be6542..68059b01b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -533,7 +533,7 @@ libs/libzrtp/libzrtp.a: cd libs/libzrtp && $(MAKE) libs/libvpx/Makefile: - cd libs/libvpx && CC=$(CC) CXX=$(CXX) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="-fvisibility=hidden" + cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --extra-cflags="$(VISIBILITY_FLAG)" libs/libvpx/libvpx.a: libs/libvpx/Makefile @cd libs/libvpx && $(MAKE) diff --git a/configure.ac b/configure.ac index ad55efe6dd..8746b0c75f 100644 --- a/configure.ac +++ b/configure.ac @@ -451,6 +451,16 @@ if test "${enable_address_sanitizer}" = "yes"; then fi +case "${ax_cv_c_compiler_vendor}" in +sun) + VISIBILITY_FLAG=-xldscope=hidden +;; +*) + VISIBILITY_FLAG=-fvisibility=hidden +;; +esac +AC_SUBST(VISIBILITY_FLAG) + # # gcc visibility cflag checks # diff --git a/libs/libvpx/libs.mk b/libs/libvpx/libs.mk index e6fb068bf7..6129ff258b 100644 --- a/libs/libvpx/libs.mk +++ b/libs/libvpx/libs.mk @@ -107,7 +107,7 @@ ifeq ($(CONFIG_VP9_DECODER),yes) endif VP9_PREFIX=vp9/ -$(BUILD_PFX)$(VP9_PREFIX)%.c.o: CFLAGS += -Wextra +$(BUILD_PFX)$(VP9_PREFIX)%.c.o: # VP10 make file ifeq ($(CONFIG_VP10),yes) @@ -141,7 +141,7 @@ ifeq ($(CONFIG_VP10_DECODER),yes) endif VP10_PREFIX=vp10/ -$(BUILD_PFX)$(VP10_PREFIX)%.c.o: CFLAGS += -Wextra +$(BUILD_PFX)$(VP10_PREFIX)%.c.o: ifeq ($(CONFIG_ENCODERS),yes) CODEC_DOC_SECTIONS += encoder