diff options
author | Karel Zak | 2013-05-07 09:50:22 +0200 |
---|---|---|
committer | Karel Zak | 2013-05-07 09:50:22 +0200 |
commit | 7697771d8f1df3576c73153f392285bb8973c117 (patch) | |
tree | 6cfa0400aba174db83b621e28a44c4832588b826 /m4 | |
parent | lib/colors: add colormode_or_err() (diff) | |
download | kernel-qcow2-util-linux-7697771d8f1df3576c73153f392285bb8973c117.tar.gz kernel-qcow2-util-linux-7697771d8f1df3576c73153f392285bb8973c117.tar.xz kernel-qcow2-util-linux-7697771d8f1df3576c73153f392285bb8973c117.zip |
build-sys: use -Wno-clobbered for some BSD crap
* extend UL_WARN_ADD() for accept non-default CFLAGS variable
* add BSD_WARN_CFLAGS with -Wno-clobbered
* use all this for pg(1) and more(1)
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/compiler.m4 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/m4/compiler.m4 b/m4/compiler.m4 index eb94510e3..062f93623 100644 --- a/m4/compiler.m4 +++ b/m4/compiler.m4 @@ -14,10 +14,11 @@ m4_ifdef([AS_VAR_APPEND], [m4_define([UL_AS_VAR_APPEND], [AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])]) -# UL_ADD_WARN([parameter]) +# UL_ADD_WARN(COMPILER_OPTION [, VARNAME]) # ------------------------ -# Adds parameter to WARN_CFLAGS if the compiler supports it. +# Adds parameter to WARN_CFLAGS (or to $VARNAME) if the compiler supports it. AC_DEFUN([UL_WARN_ADD], [ + m4_define([warnvarname], m4_default([$2],WARN_CFLAGS)) AS_VAR_PUSHDEF([ul_Warn], [ul_cv_warn_$1])dnl AC_CACHE_CHECK([whether compiler handles $1], m4_defn([ul_Warn]), [ ul_save_CPPFLAGS="$CPPFLAGS" @@ -27,6 +28,6 @@ AC_DEFUN([UL_WARN_ADD], [ [AS_VAR_SET(ul_Warn, [no])]) CPPFLAGS="$ul_save_CPPFLAGS" ]) - AS_VAR_IF(ul_Warn, [yes], [UL_AS_VAR_APPEND([WARN_CFLAGS], [" $1"])]) + AS_VAR_IF(ul_Warn, [yes], [UL_AS_VAR_APPEND(warnvarname, [" $1"])]) ]) |