|
From: <sv...@va...> - 2015-06-05 17:10:05
|
Author: florian
Date: Fri Jun 5 18:09:57 2015
New Revision: 15320
Log:
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.
Modified:
trunk/configure.ac
trunk/perf/Makefile.am
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Jun 5 18:09:57 2015
@@ -1697,27 +1697,7 @@
# 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_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])
Modified: trunk/perf/Makefile.am
==============================================================================
--- trunk/perf/Makefile.am (original)
+++ trunk/perf/Makefile.am Fri Jun 5 18:09:57 2015
@@ -33,7 +33,5 @@
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@
|