ref: f7c386bab0e637dff65c3fe546a83e9564028aff
parent: ebefb90b75f07ea5ab06d6b2a5ea5355c843d266
author: Jerome Jiang <jianj@google.com>
date: Wed Mar 3 12:33:30 EST 2021
Use -std=gnu++11 instead of -std=c++11 Cygwin and msys2 have stricter compliance requirement over standard c headers. Bug: webm:1708 Change-Id: I676b1227b9dd304149e50016468df0f057c6a78f
--- a/configure
+++ b/configure
@@ -731,17 +731,17 @@
soft_enable libyuv
;;
*-android-*)
- check_add_cxxflags -std=c++11 && soft_enable webm_io
+ check_add_cxxflags -std=gnu++11 && soft_enable webm_io
soft_enable libyuv
# GTestLog must be modified to use Android logging utilities.
;;
*-darwin-*)
- check_add_cxxflags -std=c++11
+ check_add_cxxflags -std=gnu++11
# iOS/ARM builds do not work with gtest. This does not match
# x86 targets.
;;
*-iphonesimulator-*)
- check_add_cxxflags -std=c++11 && soft_enable webm_io
+ check_add_cxxflags -std=gnu++11 && soft_enable webm_io
soft_enable libyuv
;;
*-win*)
@@ -748,7 +748,7 @@
# Some mingw toolchains don't have pthread available by default.
# Treat these more like visual studio where threading in gtest
# would be disabled for the same reason.
- check_add_cxxflags -std=c++11 && soft_enable unit_tests \
+ check_add_cxxflags -std=gnu++11 && soft_enable unit_tests \
&& soft_enable webm_io
check_cxx "$@" <<EOF && soft_enable libyuv
int z;
@@ -755,9 +755,9 @@
EOF
;;
*)
- enabled pthread_h && check_add_cxxflags -std=c++11 \
+ enabled pthread_h && check_add_cxxflags -std=gnu++11 \
&& soft_enable unit_tests
- check_add_cxxflags -std=c++11 && soft_enable webm_io
+ check_add_cxxflags -std=gnu++11 && soft_enable webm_io
check_cxx "$@" <<EOF && soft_enable libyuv
int z;
EOF
--- a/examples/vpx_dec_fuzzer.cc
+++ b/examples/vpx_dec_fuzzer.cc
@@ -41,7 +41,7 @@
$make -j32
* Build vp9 fuzzer
- $ $CXX $CXXFLAGS -std=c++11 -DDECODER=vp9 \
+ $ $CXX $CXXFLAGS -std=gnu++11 -DDECODER=vp9 \
-fsanitize=fuzzer -I../libvpx -I. -Wl,--start-group \
../libvpx/examples/vpx_dec_fuzzer.cc -o ./vpx_dec_fuzzer_vp9 \
./libvpx.a -Wl,--end-group
--- a/third_party/libwebm/Android.mk
+++ b/third_party/libwebm/Android.mk
@@ -3,7 +3,7 @@
include $(CLEAR_VARS)
LOCAL_MODULE:= libwebm
LOCAL_CPPFLAGS:=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-LOCAL_CPPFLAGS+=-D__STDC_LIMIT_MACROS -std=c++11
+LOCAL_CPPFLAGS+=-D__STDC_LIMIT_MACROS -std=gnu++11
LOCAL_C_INCLUDES:= $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES:= $(LOCAL_PATH)