From: Bart Van Assche Date: Sun, 15 May 2011 17:05:36 +0000 (+0000) Subject: Added configure tests for the compiler flags -Wno-nonnull and -Wno-overflow. X-Git-Tag: svn/VALGRIND_3_7_0~480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e04a1bbb646297c7be7003b94656ad6e2ce1f266;p=thirdparty%2Fvalgrind.git Added configure tests for the compiler flags -Wno-nonnull and -Wno-overflow. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11757 --- diff --git a/configure.in b/configure.in index f3fe575231..e95b4d7cb6 100644 --- a/configure.in +++ b/configure.in @@ -1282,6 +1282,52 @@ AC_MSG_RESULT([no]) CFLAGS=$safe_CFLAGS +# does this compiler support -Wno-nonnull ? + +AC_MSG_CHECKING([if gcc accepts -Wno-nonnull]) + +safe_CFLAGS=$CFLAGS +CFLAGS="-Wno-nonnull" + +AC_TRY_COMPILE( +[ ], +[ + return 0; +], +[ +AC_SUBST([FLAG_W_NO_NONNULL], [-Wno-nonnull]) +AC_MSG_RESULT([yes]) +], +[ +AC_SUBST([FLAG_W_NO_NONNULL], []) +AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + + +# does this compiler support -Wno-overflow ? + +AC_MSG_CHECKING([if gcc accepts -Wno-overflow]) + +safe_CFLAGS=$CFLAGS +CFLAGS="-Wno-overflow" + +AC_TRY_COMPILE( +[ ], +[ + return 0; +], +[ +AC_SUBST([FLAG_W_NO_OVERFLOW], [-Wno-overflow]) +AC_MSG_RESULT([yes]) +], +[ +AC_SUBST([FLAG_W_NO_OVERFLOW], []) +AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + + # does this compiler support -Wno-uninitialized ? AC_MSG_CHECKING([if gcc accepts -Wno-uninitialized])