From cb704b95e3b00f6a2059441ab50596648458600e Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 4 Jun 2019 14:45:36 -0700 Subject: [PATCH] configure: test -Wno-* flags used with libyuv MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit with g++ this avoids: command line option ‘-Wno-missing-prototypes’ is valid for C/ObjC but not for C++ the flag is necessary with clang. BUG=webm:1584 Change-Id: I250c76483302d913999e5f9e0d09ee6449b052df --- build/make/configure.sh | 1 + configure | 8 ++++++++ examples.mk | 4 +--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/build/make/configure.sh b/build/make/configure.sh index 8f2928a9d..e95035350 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh @@ -507,6 +507,7 @@ AS_SFX = ${AS_SFX:-.asm} EXE_SFX = ${EXE_SFX} VCPROJ_SFX = ${VCPROJ_SFX} RTCD_OPTIONS = ${RTCD_OPTIONS} +LIBYUV_CXXFLAGS = ${LIBYUV_CXXFLAGS} EOF if enabled rvct; then cat >> $1 << EOF diff --git a/configure b/configure index 0fd680816..d29e00ad8 100755 --- a/configure +++ b/configure @@ -645,6 +645,14 @@ process_toolchain() { if enabled arm; then check_add_cxxflags -Wno-psabi fi + + # disable some warnings specific to libyuv. + check_cxxflags -Wno-missing-declarations \ + && LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-missing-declarations" + check_cxxflags -Wno-missing-prototypes \ + && LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-missing-prototypes" + check_cxxflags -Wno-unused-parameter \ + && LIBYUV_CXXFLAGS="${LIBYUV_CXXFLAGS} -Wno-unused-parameter" fi if enabled icc; then diff --git a/examples.mk b/examples.mk index 208708af7..758ca7f88 100644 --- a/examples.mk +++ b/examples.mk @@ -77,9 +77,7 @@ vpxdec.SRCS += tools_common.c tools_common.h vpxdec.SRCS += y4menc.c y4menc.h ifeq ($(CONFIG_LIBYUV),yes) vpxdec.SRCS += $(LIBYUV_SRCS) - $(BUILD_PFX)third_party/libyuv/%.cc.o: CXXFLAGS += -Wno-unused-parameter - $(BUILD_PFX)third_party/libyuv/%.cc.o: CXXFLAGS += -Wno-missing-declarations - $(BUILD_PFX)third_party/libyuv/%.cc.o: CXXFLAGS += -Wno-missing-prototypes + $(BUILD_PFX)third_party/libyuv/%.cc.o: CXXFLAGS += ${LIBYUV_CXXFLAGS} endif ifeq ($(CONFIG_WEBM_IO),yes) vpxdec.SRCS += $(LIBWEBM_COMMON_SRCS) -- 2.40.0