]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - m4/attributes.m4
build-sys: Append -Werror when testing flags
[thirdparty/kmod.git] / m4 / attributes.m4
index c80ae62ede635d3b1fccc22fd69f30c9f7f04250..e8221970505d02ee2afb193516eb049e920d9824 100644 (file)
@@ -40,7 +40,7 @@ AC_DEFUN([CC_CHECK_FLAG_APPEND], [
   AC_CACHE_CHECK([if $CC supports flag $3 in envvar $2],
                  AS_TR_SH([cc_cv_$2_$3]),
                 [eval "AS_TR_SH([cc_save_$2])='${$2}'"
-                 eval "AS_TR_SH([$2])='$3'"
+                 eval "AS_TR_SH([$2])='-Werror $3'"
                  AC_COMPILE_IFELSE([AC_LANG_SOURCE([int a = 0; int main(void) { return a; } ])],
                                     [eval "AS_TR_SH([cc_cv_$2_$3])='yes'"],
                                     [eval "AS_TR_SH([cc_cv_$2_$3])='no'"])