]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Simplify configury and eliminate AC_GCC_WARNING_COND which was only used
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 5 Jun 2015 17:09:57 +0000 (17:09 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 5 Jun 2015 17:09:57 +0000 (17:09 +0000)
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
perf/Makefile.am

index a43803dc382d6dc4ea8e3a075f441afcd5e9fbdd..5fe26bd079fb8d6e7eb2900ae481e39c2ab657a6 100644 (file)
@@ -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])
index 20150852c232437b936625bc6f1f568bbc8185ed..ab504e937530cad9657d0157a5d21e9bea9d1a50 100644 (file)
@@ -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@