From 4880368c8d71db85e79287ebf55fc87da928f568 Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 5 Jun 2015 17:09:57 +0000 Subject: [PATCH] Simplify configury and eliminate AC_GCC_WARNING_COND which was only used in one place and can be replaced with AC_GCC_WARNING_SUBST_NEW. Adjust perf/Makefile.am. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15320 --- configure.ac | 23 ++--------------------- perf/Makefile.am | 6 ++---- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/configure.ac b/configure.ac index a43803dc38..5fe26bd079 100644 --- a/configure.ac +++ b/configure.ac @@ -1697,27 +1697,7 @@ AC_SUBST(PREFERRED_STACK_BOUNDARY_2) # Convenience function to check whether GCC supports a particular -# warning option. Takes two arguments, first the warning flag name -# to check (without -W), then the conditional name to set if that -# warning flag is supported. -AC_DEFUN([AC_GCC_WARNING_COND],[ - AC_MSG_CHECKING([if gcc accepts -W$1]) - safe_CFLAGS=$CFLAGS - CFLAGS="-W$1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[;]])], [ - has_warning_flag=yes - AC_MSG_RESULT([yes])], [ - has_warning_flag=no - AC_MSG_RESULT([no])]) - CFLAGS=$safe_CFLAGS - AM_CONDITIONAL([$2], test x$has_warning_flag = xyes) -]) - -AC_GCC_WARNING_COND([pointer-sign], [HAS_POINTER_SIGN_WARNING]) - -# Convenience function to check whether GCC supports a particular -# warning option. Similar to AC_GCC_WARNING_COND, but does a -# substitution instead of setting an conditional. Takes two arguments, +# warning option. Takes two arguments, # first the warning flag name to check (without -W), then the # substitution name to set with -Wno-warning-flag if the flag exists, # or the empty string if the compiler doesn't accept the flag. Note @@ -1752,6 +1732,7 @@ AC_DEFUN([AC_GCC_WARNING_SUBST],[ AC_GCC_WARNING_SUBST_NO([format-zero-length], [FLAG_W_NO_FORMAT_ZERO_LENGTH]) AC_GCC_WARNING_SUBST_NO([nonnull], [FLAG_W_NO_NONNULL]) AC_GCC_WARNING_SUBST_NO([overflow], [FLAG_W_NO_OVERFLOW]) +AC_GCC_WARNING_SUBST_NO([pointer-sign], [FLAG_W_NO_POINTER_SIGN]) AC_GCC_WARNING_SUBST_NO([uninitialized], [FLAG_W_NO_UNINITIALIZED]) AC_GCC_WARNING_SUBST_NO([unused-function], [FLAG_W_NO_UNUSED_FUNCTION]) AC_GCC_WARNING_SUBST_NO([static-local-in-inline], [FLAG_W_NO_STATIC_LOCAL_IN_INLINE]) diff --git a/perf/Makefile.am b/perf/Makefile.am index 20150852c2..ab504e9375 100644 --- a/perf/Makefile.am +++ b/perf/Makefile.am @@ -33,7 +33,5 @@ fbench_CFLAGS = $(AM_CFLAGS) -O2 ffbench_LDADD = -lm memrw_LDADD = -lpthread -tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow -Wno-inline -if HAS_POINTER_SIGN_WARNING -tinycc_CFLAGS += -Wno-pointer-sign -endif +tinycc_CFLAGS = $(AM_CFLAGS) -Wno-shadow -Wno-inline \ + @FLAG_W_NO_POINTER_SIGN@ -- 2.47.3