shithub: libvpx

Download patch

ref: cb704b95e3b00f6a2059441ab50596648458600e
parent: 54abc9bade46e1e9532e1e984489bb6abdec74b0
author: James Zern <jzern@google.com>
date: Tue Jun 4 10:45:36 EDT 2019

configure: test -Wno-* flags used with libyuv

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

--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -507,6 +507,7 @@
 EXE_SFX   = ${EXE_SFX}
 VCPROJ_SFX = ${VCPROJ_SFX}
 RTCD_OPTIONS = ${RTCD_OPTIONS}
+LIBYUV_CXXFLAGS = ${LIBYUV_CXXFLAGS}
 EOF
 
   if enabled rvct; then cat >> $1 << EOF
--- a/configure
+++ b/configure
@@ -645,6 +645,14 @@
         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
--- a/examples.mk
+++ b/examples.mk
@@ -77,9 +77,7 @@
 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)