]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Revert configure support for adding -Werror=format-security.
authorMark Wielaard <mark@klomp.org>
Fri, 16 May 2014 22:28:48 +0000 (22:28 +0000)
committerMark Wielaard <mark@klomp.org>
Fri, 16 May 2014 22:28:48 +0000 (22:28 +0000)
This reverts part of valgrind svn r13962. There was a typo in the configure
check that caused failures when -Werror=format-security wasn't supported
and the flag interfered badly with -Wno-format-zero-length. So remove
for now and only add back when properly tested on various (older) setups.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13976

Makefile.tool-tests.am
configure.ac

index baefbd76bc6e3f7a84429476f6fdcea8754c246a..6521afb4ac78ae0b73cec874b79c08fd8bf4ffb4 100644 (file)
@@ -32,10 +32,6 @@ if HAS_WRITE_STRINGS_WARNING
 CFLAGS += -Wno-write-strings
 endif
 
-if HAS_ERROR_FORMAT_SECURITY
-CFLAGS += -Wformat -Werror=format-security
-endif
-
 if COMPILER_IS_CLANG
 CFLAGS   += -Wno-format-extra-args       # perf/tinycc.c
 CFLAGS   += -Wno-literal-range           # none/tests/amd64/fxtract.c
index f3ba11dcb925998ba244f30f27cd4581e7d9f2db..af4228915a105d4b29b97caec2a6916330346be7 100644 (file)
@@ -1681,31 +1681,6 @@ fi
 
 AM_CONDITIONAL(HAS_WRITE_STRINGS_WARNING, test x$no_write_strings = xyes)
 
-
-# does this compiler support -Wformat -Werror=format-security ?
-AC_MSG_CHECKING([if gcc accepts -Wformat -Werror=format-security])
-
-safe_CFLAGS=$CFLAGS
-CFLAGS="-Wformat -Werror=format-security"
-
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
-  return 0;
-]])], [
-error_format_security=yes
-AC_MSG_RESULT([yes])
-], [
-error_format_security=no
-AC_MSG_RESULT([no])
-])
-CFLAGS=$safe_CFLAGS
-
-if test x$no_write_strings = xyes; then
-  CFLAGS="$CFLAGS -Wformat -Werror=format-security"
-  CXXFLAGS="$CXXFLAGS -Wformat -Werror=format-security"
-fi
-
-AM_CONDITIONAL(HAS_ERROR_FORMAT_SECURITY, test x$error_format_security = xyes)
-
 # does this compiler support -Wno-empty-body ?
 
 AC_MSG_CHECKING([if gcc accepts -Wno-empty-body])