Fix gcc warning when using configure --enable-permissive option

When configured with --enable-permissive option, add -fpermissive to C++
flags, not C flags, to avoid the gcc warning

command-line option '-fpermissive' is valid for C++/ObjC++ but not for C

when compiling C code.

Closes https://github.com/wxWidgets/wxWidgets/pull/2232
This commit is contained in:
Biswapriyo Nath
2021-02-14 20:51:09 +05:30
committed by Vadim Zeitlin
parent d2c3c6a35b
commit ae9b55712d
2 changed files with 2 additions and 2 deletions

2
configure vendored
View File

@@ -33364,7 +33364,7 @@ if test "$GCC" = "yes" ; then
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-exceptions"
fi
if test "$wxUSE_PERMISSIVE" = "yes" ; then
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -fpermissive"
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fpermissive"
fi
case "${host}" in

View File

@@ -5462,7 +5462,7 @@ if test "$GCC" = "yes" ; then
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fno-exceptions"
fi
if test "$wxUSE_PERMISSIVE" = "yes" ; then
WXCONFIG_CFLAGS="$WXCONFIG_CFLAGS -fpermissive"
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -fpermissive"
fi
dnl Ian Brown <ian.brown@printsoft.de> reports that versions of gcc before