From 11022644f6dabf843bfe0ba422035b61fe4d4883 Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Tue, 26 May 2020 13:06:03 +0300 Subject: configure.ac: add -fno-builtin-strcmp if valgrind is enabled Recent GCC provides strcmp which makes Valgrind assume that it accesses uninitialized data. Disable this optimization if Valgrind tests are enabled. Fixes #944 Signed-off-by: Dmitry Baryshkov --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 2aca4b9fca..f4c2e04bde 100644 --- a/configure.ac +++ b/configure.ac @@ -513,6 +513,10 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-fdiagnostics-show-option]) fi +if test "$gl_cv_opt_valgrind_tests" != no; then + gl_WARN_ADD([-fno-builtin-strcmp]) +fi + AC_SUBST([WERROR_CFLAGS]) AC_SUBST([WSTACK_CFLAGS]) AC_SUBST([WARN_CFLAGS]) -- cgit v1.2.1