[llvm-commits] [llvm] r172006 - in /llvm/trunk: Makefile.config.in Makefile.rules autoconf/configure.ac configure
Duncan Sands
baldrick at free.fr
Wed Jan 9 23:15:06 PST 2013
Hi David, this buildbot
http://lab.llvm.org:8011/builders/dragonegg-x86_64-linux-gcc-4.6-test
is failing to build LLVM with this error
cc1plus: error: unrecognized command line option "-Wno-maybe-uninitialized"
gcc version 4.3.2 (Debian 4.3.2-1.1)
Can you please take a look.
Thanks, Duncan.
On 09/01/13 23:11, David Greene wrote:
> Author: greened
> Date: Wed Jan 9 16:11:13 2013
> New Revision: 172006
>
> URL: http://llvm.org/viewvc/llvm-project?rev=172006&view=rev
> Log:
> Disable -Wuninitialized for gcc
>
> If the compiler is gcc, disable variants of -Wuninitialized depending
> on the gcc version. This gets a lot of false positive warnings out of
> the build.
>
> Generate a new configure for the gcc -Wno-uninitialized fix.
>
> Pick up -Wno-uninitialized from configure
>
> Add the option -Wno[-maybe]-uninitialized as determined by configure.
>
> Modified:
> llvm/trunk/Makefile.config.in
> llvm/trunk/Makefile.rules
> llvm/trunk/autoconf/configure.ac
> llvm/trunk/configure
>
> Modified: llvm/trunk/Makefile.config.in
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.config.in?rev=172006&r1=172005&r2=172006&view=diff
> ==============================================================================
> --- llvm/trunk/Makefile.config.in (original)
> +++ llvm/trunk/Makefile.config.in Wed Jan 9 16:11:13 2013
> @@ -358,6 +358,10 @@
> NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@
> # -Wcovered-switch-default
> COVERED_SWITCH_DEFAULT = @COVERED_SWITCH_DEFAULT@
> +# -Wno-uninitialized
> +NO_UNINITIALIZED = @NO_UNINITIALIZED@
> +# -Wno-maybe-uninitialized
> +NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@
>
> # Was polly found in tools/polly?
> LLVM_HAS_POLLY = @LLVM_HAS_POLLY@
>
> Modified: llvm/trunk/Makefile.rules
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=172006&r1=172005&r2=172006&view=diff
> ==============================================================================
> --- llvm/trunk/Makefile.rules (original)
> +++ llvm/trunk/Makefile.rules Wed Jan 9 16:11:13 2013
> @@ -668,7 +668,8 @@
> CompileCommonOpts += -pedantic -Wno-long-long
> endif
> CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \
> - $(EXTRA_OPTIONS) $(COVERED_SWITCH_DEFAULT)
> + $(EXTRA_OPTIONS) $(COVERED_SWITCH_DEFAULT) \
> + $(NO_UNINITIALIZED) $(NO_MAYBE_UNINITIALIZED)
> # Enable cast-qual for C++; the workaround is to use const_cast.
> CXX.Flags += -Wcast-qual
>
>
> Modified: llvm/trunk/autoconf/configure.ac
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=172006&r1=172005&r2=172006&view=diff
> ==============================================================================
> --- llvm/trunk/autoconf/configure.ac (original)
> +++ llvm/trunk/autoconf/configure.ac Wed Jan 9 16:11:13 2013
> @@ -1257,7 +1257,27 @@
> CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros])
> CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers])
> CXX_FLAG_CHECK(COVERED_SWITCH_DEFAULT, [-Wcovered-switch-default])
> -AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT])
> +dnl GCC's potential uninitialized use analysis is weak and presents lots of
> +dnl false positives, so disable it.
> +if test "$GXX" = "yes"
> +then
> + CXX_FLAG_CHECK(NO_MAYBE_UNINITIALIZED, [-Wno-maybe-uninitialized])
> + dnl gcc 4.7 introduced -Wmaybe-uninitialized to distinguish cases which are
> + dnl known to be uninitialized from cases which might be uninitialized. We
> + dnl still want to catch the first kind of errors.
> + if test "$NO_MAYBE_UNINITIALIZED" != "-Wno-maybe-uninitialized"
> + then
> + CXX_FLAG_CHECK(NO_UNINITIALIZED, [-Wno-uninitialized])
> + else
> + dnl AC_SUBST doesn't work with empty strings.
> + NO_UNINITIALIZED=
> + fi
> +else
> + NO_UNINITIALIZED=
> + NO_MAYBE_UNINITIALIZED=
> +fi
> +AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED])
> +
>
> dnl===-----------------------------------------------------------------------===
> dnl===
>
> Modified: llvm/trunk/configure
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=172006&r1=172005&r2=172006&view=diff
> ==============================================================================
> --- llvm/trunk/configure (original)
> +++ llvm/trunk/configure Wed Jan 9 16:11:13 2013
> @@ -767,6 +767,8 @@
> NO_VARIADIC_MACROS
> NO_MISSING_FIELD_INITIALIZERS
> COVERED_SWITCH_DEFAULT
> +NO_MAYBE_UNINITIALIZED
> +NO_UNINITIALIZED
> USE_UDIS86
> USE_OPROFILE
> USE_INTEL_JITEVENTS
> @@ -10485,7 +10487,7 @@
> lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
> lt_status=$lt_dlunknown
> cat > conftest.$ac_ext <<EOF
> -#line 10488 "configure"
> +#line 10490 "configure"
> #include "confdefs.h"
>
> #if HAVE_DLFCN_H
> @@ -12246,8 +12248,24 @@
>
> COVERED_SWITCH_DEFAULT=`$CXX -Werror -Wcovered-switch-default -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wcovered-switch-default`
>
> -{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT" >&5
> -echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT" >&6; }
> +if test "$GXX" = "yes"
> +then
> + NO_MAYBE_UNINITIALIZED=`$CXX -Werror -Wno-maybe-uninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-maybe-uninitialized`
> +
> + if test "$NO_MAYBE_UNINITIALIZED" != "-Wno-maybe-uninitialized"
> + then
> + NO_UNINITIALIZED=`$CXX -Werror -Wno-uninitialized -fsyntax-only -xc /dev/null 2>/dev/null && echo -Wno-uninitialized`
> +
> + else
> + NO_UNINITIALIZED=
> + fi
> +else
> + NO_UNINITIALIZED=
> + NO_MAYBE_UNINITIALIZED=
> +fi
> +{ echo "$as_me:$LINENO: result: $NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED" >&5
> +echo "${ECHO_T}$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED" >&6; }
> +
>
>
>
> @@ -22303,6 +22321,8 @@
> NO_VARIADIC_MACROS!$NO_VARIADIC_MACROS$ac_delim
> NO_MISSING_FIELD_INITIALIZERS!$NO_MISSING_FIELD_INITIALIZERS$ac_delim
> COVERED_SWITCH_DEFAULT!$COVERED_SWITCH_DEFAULT$ac_delim
> +NO_MAYBE_UNINITIALIZED!$NO_MAYBE_UNINITIALIZED$ac_delim
> +NO_UNINITIALIZED!$NO_UNINITIALIZED$ac_delim
> USE_UDIS86!$USE_UDIS86$ac_delim
> USE_OPROFILE!$USE_OPROFILE$ac_delim
> USE_INTEL_JITEVENTS!$USE_INTEL_JITEVENTS$ac_delim
> @@ -22330,8 +22350,6 @@
> ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
> RPATH!$RPATH$ac_delim
> RDYNAMIC!$RDYNAMIC$ac_delim
> -program_prefix!$program_prefix$ac_delim
> -LIBOBJS!$LIBOBJS$ac_delim
> _ACEOF
>
> if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
> @@ -22373,10 +22391,12 @@
> ac_delim='%!_!# '
> for ac_last_try in false false false false false :; do
> cat >conf$$subs.sed <<_ACEOF
> +program_prefix!$program_prefix$ac_delim
> +LIBOBJS!$LIBOBJS$ac_delim
> LTLIBOBJS!$LTLIBOBJS$ac_delim
> _ACEOF
>
> - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 1; then
> + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 3; then
> break
> elif $ac_last_try; then
> { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list