build: no-longer disable WARN_CXXFLAGS when CXXFLAGS is set

Now that CXXFLAGS are back in user control, I don't think there's a
reason to no-longer use our warning flags when CXXFLAGS has been
overriden (this includes when building from depends).

Anyone can suppress warnings from third-party code by
passing the relevant `-Wno-` options in CXXFLAGS.

Fixes: #18092.
This commit is contained in:
fanquake 2022-08-15 14:59:05 +01:00
parent b088062e68
commit f0e22be69a
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

View File

@ -401,7 +401,6 @@ if test "$enable_werror" = "yes"; then
ERROR_CXXFLAGS=$CXXFLAG_WERROR
fi
if test "$CXXFLAGS_overridden" = "no"; then
AX_CHECK_COMPILE_FLAG([-Wall], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wall"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-Wextra], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wextra"], [], [$CXXFLAG_WERROR])
AX_CHECK_COMPILE_FLAG([-Wgnu], [WARN_CXXFLAGS="$WARN_CXXFLAGS -Wgnu"], [], [$CXXFLAG_WERROR])
@ -432,7 +431,6 @@ if test "$CXXFLAGS_overridden" = "no"; then
if test "$suppress_external_warnings" != "yes" ; then
AX_CHECK_COMPILE_FLAG([-Wdeprecated-copy], [NOWARN_CXXFLAGS="$NOWARN_CXXFLAGS -Wno-deprecated-copy"], [], [$CXXFLAG_WERROR])
fi
fi
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR])