Use -std=gnu++11 instead of -std=c++11 due to gcc extensions

This commit is contained in:
Jonathan G Rennison
2019-01-13 23:23:36 +00:00
parent 47c7f8f3bb
commit d86aa7719b

View File

@@ -1242,6 +1242,8 @@ make_compiler_cflags() {
eval eval "ldflags=\\\$$4" eval eval "ldflags=\\\$$4"
eval eval "features=\\\$$5" eval eval "features=\\\$$5"
cppstd="-std=c++11"
if [ `echo "$version_line" | cut -d' ' -f1` = "icc" ]; then if [ `echo "$version_line" | cut -d' ' -f1` = "icc" ]; then
# Enable some things only for certain ICC versions # Enable some things only for certain ICC versions
cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g` cc_version=`$1 -dumpversion | cut -c 1-4 | sed s@\\\.@@g`
@@ -1407,6 +1409,7 @@ make_compiler_cflags() {
flags="$flags -Wwrite-strings -Wpointer-arith" flags="$flags -Wwrite-strings -Wpointer-arith"
flags="$flags -W -Wno-unused-parameter -Wredundant-decls" flags="$flags -W -Wno-unused-parameter -Wredundant-decls"
flags="$flags -Wformat=2 -Wformat-security" flags="$flags -Wformat=2 -Wformat-security"
cppstd="-std=gnu++11"
if [ $enable_assert -eq 0 ]; then if [ $enable_assert -eq 0 ]; then
# Do not warn about unused variables when building without asserts # Do not warn about unused variables when building without asserts
@@ -1497,7 +1500,7 @@ make_compiler_cflags() {
fi fi
eval "$2=\"$flags\"" eval "$2=\"$flags\""
eval "$3=\"$cxxflags\"" eval "$3=\"$cxxflags $cppstd\""
eval "$4=\"$ldflags\"" eval "$4=\"$ldflags\""
eval "$5=\"$features\"" eval "$5=\"$features\""
} }
@@ -1533,8 +1536,6 @@ make_cflags_and_ldflags() {
CFLAGS="$CFLAGS -D$os" CFLAGS="$CFLAGS -D$os"
CFLAGS_BUILD="$CFLAGS_BUILD -D$os" CFLAGS_BUILD="$CFLAGS_BUILD -D$os"
CXXFLAGS="$CXXFLAGS -std=c++11"
CXXFLAGS_BUILD="$CXXFLAGS_BUILD -std=c++11"
if [ "$enable_debug" = "0" ]; then if [ "$enable_debug" = "0" ]; then
# No debug, add default stuff # No debug, add default stuff