From: Florian Krohm Date: Fri, 5 Jun 2015 21:19:06 +0000 (+0000) Subject: clang, as opposed to gcc, does not terminate with a non-zero return code X-Git-Tag: svn/VALGRIND_3_11_0~309 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b6c5130bdc35be74239bf983f62376f239597bfc;p=thirdparty%2Fvalgrind.git clang, as opposed to gcc, does not terminate with a non-zero return code in case an unrecognised command line option is encountered. configure.ac however was assuming just that which led to compile time warnings later on. Add -Werror to the configure bits to make clang behave like gcc in this regard. Fixes BZ #348565. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15323 --- diff --git a/NEWS b/NEWS index 1f1a525ccd..a7b70e1fd7 100644 --- a/NEWS +++ b/NEWS @@ -226,8 +226,9 @@ where XXXXXX is the bug number as listed below. 347978 Remove bash dependencies where not needed 348102 Patch updating v4l2 API support 348247 jno jumps wrongly when overflow is not set +348565 Fix detection of command line option availability for clang 348728 Fix broken check for VIDIOC_G_ENC_INDEX -348565 Fix redundant condition +348748 Fix redundant condition n-i-bz Provide implementations of certain compiler builtins to support compilers who may not provide those n-i-bz Old STABS code is still being compiled, but never used. Remove it. diff --git a/configure.ac b/configure.ac index d327e6e3e6..edc57d6a6e 100644 --- a/configure.ac +++ b/configure.ac @@ -1706,7 +1706,7 @@ AC_SUBST(PREFERRED_STACK_BOUNDARY_2) AC_DEFUN([AC_GCC_WARNING_SUBST_NO],[ AC_MSG_CHECKING([if gcc accepts -W$1]) safe_CFLAGS=$CFLAGS - CFLAGS="-W$1" + CFLAGS="-W$1 -Werror" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])], [ AC_SUBST([$2], [-Wno-$1]) AC_MSG_RESULT([yes])], [ @@ -1720,7 +1720,7 @@ AC_DEFUN([AC_GCC_WARNING_SUBST_NO],[ AC_DEFUN([AC_GCC_WARNING_SUBST],[ AC_MSG_CHECKING([if gcc accepts -W$1]) safe_CFLAGS=$CFLAGS - CFLAGS="-W$1" + CFLAGS="-W$1 -Werror" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])], [ AC_SUBST([$2], [-W$1]) AC_MSG_RESULT([yes])], [