X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=autoconf%2Fconfigure.ac;h=0097db3d681d87a9dedd3da921cf9a4d0cac1009;hb=df39be6cb4eb44011db3d3e86f8fe463f81ce127;hp=ae615df2029ba34b45d994a57ba3ac37f7b2c971;hpb=ec643abe6903284fc9ae7b6d9ae5e0b4ad40ad28;p=oota-llvm.git diff --git a/autoconf/configure.ac b/autoconf/configure.ac index ae615df2029..0097db3d681 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -1270,43 +1270,24 @@ dnl Check optional compiler flags. AC_MSG_CHECKING([optional compiler flags]) CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros]) CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers]) -CXX_FLAG_CHECK(NO_NESTED_ANON_TYPES, [-Wno-nested-anon-types]) CXX_FLAG_CHECK(COVERED_SWITCH_DEFAULT, [-Wcovered-switch-default]) + dnl GCC's potential uninitialized use analysis is weak and presents lots of dnl false positives, so disable it. +NO_UNINITIALIZED= +NO_MAYBE_UNINITIALIZED= 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 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" + if test -z "$NO_MAYBE_UNINITIALIZED" then CXX_FLAG_CHECK(NO_UNINITIALIZED, [-Wno-uninitialized]) - else - dnl Some versions of gcc accept unsupported -W flags if there is - dnl no warning but stop with an error when a warning is - dnl encountered. If this gcc is earlier than 4.7, just use - dnl -Wno-uninitialized. - gxx_version=`$CXX -dumpversion` - gxx_version_major=`echo $gxx_version | cut -d'.' -f1` - gxx_version_minor=`echo $gxx_version | cut -d'.' -f2` - gxx_version_patch=`echo $gxx_version | cut -d'.' -f3` - - if test "$gxx_version_major" -ge "4" \ - && test "$gxx_version_minor" -ge "7"; then - dnl AC_SUBST doesn't work with empty strings. - NO_UNINITIALIZED= - else - NO_MAYBE_UNINITIALIZED= - CXX_FLAG_CHECK(NO_UNINITIALIZED, [-Wno-uninitialized]) - fi fi -else - NO_UNINITIALIZED= - NO_MAYBE_UNINITIALIZED= fi -AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $NO_NESTED_ANON_TYPES $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED]) +AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS $COVERED_SWITCH_DEFAULT $NO_UNINITIALIZED $NO_MAYBE_UNINITIALIZED]) AC_ARG_WITH([python], [AS_HELP_STRING([--with-python], [path to python])], @@ -1512,6 +1493,7 @@ AC_CHECK_HEADERS([sys/mman.h sys/param.h sys/resource.h sys/time.h sys/uio.h]) AC_CHECK_HEADERS([sys/types.h sys/ioctl.h malloc/malloc.h mach/mach.h]) AC_CHECK_HEADERS([valgrind/valgrind.h]) AC_CHECK_HEADERS([fenv.h]) +AC_CHECK_DECLS([FE_ALL_EXCEPT, FE_INEXACT], [], [], [[#include ]]) if test "$LLVM_ENABLE_THREADS" -eq 1 && test "$ENABLE_PTHREADS" -eq 1 ; then AC_CHECK_HEADERS(pthread.h, AC_SUBST(HAVE_PTHREAD, 1),