forked from OSchip/llvm-project
configure: when performing a compiler feature test for a -Wno-foo flag, attempt
to use -Wfoo instead of -Wno-foo. This works around a bug in some versions of gcc, where it will silently accept an unknown -Wno-foo option, but will generate an error for a compile which uses -Wno-foo if that compile also triggers any warnings. llvm-svn: 174770
This commit is contained in:
parent
388d767ab1
commit
f89ffcd705
|
@ -1,2 +1,2 @@
|
||||||
AC_DEFUN([CXX_FLAG_CHECK],
|
AC_DEFUN([CXX_FLAG_CHECK],
|
||||||
[AC_SUBST($1, `$CXX -Werror $2 -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)])
|
[AC_SUBST($1, `$CXX -Werror patsubst($2, [^-Wno-], [-W]) -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)])
|
||||||
|
|
|
@ -8719,8 +8719,6 @@ if test "${enable_ltdl_install+set}" = set; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test x"${enable_ltdl_install-no}" != xno; then
|
if test x"${enable_ltdl_install-no}" != xno; then
|
||||||
INSTALL_LTDL_TRUE=
|
INSTALL_LTDL_TRUE=
|
||||||
INSTALL_LTDL_FALSE='#'
|
INSTALL_LTDL_FALSE='#'
|
||||||
|
@ -8729,8 +8727,6 @@ else
|
||||||
INSTALL_LTDL_FALSE=
|
INSTALL_LTDL_FALSE=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if test x"${enable_ltdl_convenience-no}" != xno; then
|
if test x"${enable_ltdl_convenience-no}" != xno; then
|
||||||
CONVENIENCE_LTDL_TRUE=
|
CONVENIENCE_LTDL_TRUE=
|
||||||
CONVENIENCE_LTDL_FALSE='#'
|
CONVENIENCE_LTDL_FALSE='#'
|
||||||
|
@ -10498,7 +10494,7 @@ else
|
||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 10501 "configure"
|
#line 10497 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
@ -12261,21 +12257,21 @@ echo "${ECHO_T}ok" >&6; }
|
||||||
|
|
||||||
{ echo "$as_me:$LINENO: checking optional compiler flags" >&5
|
{ echo "$as_me:$LINENO: checking optional compiler flags" >&5
|
||||||
echo $ECHO_N "checking optional compiler flags... $ECHO_C" >&6; }
|
echo $ECHO_N "checking optional compiler flags... $ECHO_C" >&6; }
|
||||||
NO_VARIADIC_MACROS=`$CXX -Werror -Wno-variadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros`
|
NO_VARIADIC_MACROS=`$CXX -Werror -Wvariadic-macros -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-variadic-macros`
|
||||||
|
|
||||||
NO_MISSING_FIELD_INITIALIZERS=`$CXX -Werror -Wno-missing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers`
|
NO_MISSING_FIELD_INITIALIZERS=`$CXX -Werror -Wmissing-field-initializers -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-missing-field-initializers`
|
||||||
|
|
||||||
NO_NESTED_ANON_TYPES=`$CXX -Werror -Wno-nested-anon-types -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-nested-anon-types`
|
NO_NESTED_ANON_TYPES=`$CXX -Werror -Wnested-anon-types -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-nested-anon-types`
|
||||||
|
|
||||||
COVERED_SWITCH_DEFAULT=`$CXX -Werror -Wcovered-switch-default -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wcovered-switch-default`
|
COVERED_SWITCH_DEFAULT=`$CXX -Werror -Wcovered-switch-default -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wcovered-switch-default`
|
||||||
|
|
||||||
if test "$GXX" = "yes"
|
if test "$GXX" = "yes"
|
||||||
then
|
then
|
||||||
NO_MAYBE_UNINITIALIZED=`$CXX -Werror -Wno-maybe-uninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-maybe-uninitialized`
|
NO_MAYBE_UNINITIALIZED=`$CXX -Werror -Wmaybe-uninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-maybe-uninitialized`
|
||||||
|
|
||||||
if test "$NO_MAYBE_UNINITIALIZED" != "-Wno-maybe-uninitialized"
|
if test "$NO_MAYBE_UNINITIALIZED" != "-Wno-maybe-uninitialized"
|
||||||
then
|
then
|
||||||
NO_UNINITIALIZED=`$CXX -Werror -Wno-uninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-uninitialized`
|
NO_UNINITIALIZED=`$CXX -Werror -Wuninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-uninitialized`
|
||||||
|
|
||||||
else
|
else
|
||||||
gxx_version=`$CXX -dumpversion`
|
gxx_version=`$CXX -dumpversion`
|
||||||
|
@ -12288,7 +12284,7 @@ then
|
||||||
NO_UNINITIALIZED=
|
NO_UNINITIALIZED=
|
||||||
else
|
else
|
||||||
NO_MAYBE_UNINITIALIZED=
|
NO_MAYBE_UNINITIALIZED=
|
||||||
NO_UNINITIALIZED=`$CXX -Werror -Wno-uninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-uninitialized`
|
NO_UNINITIALIZED=`$CXX -Werror -Wuninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-uninitialized`
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue