From 23d496ac50d49870881e91cd1e58dcb7e303d319 Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Fri, 8 Jul 2022 15:34:01 +0200 Subject: acinclude: Fix double -Werror. We're adding -Werror argument twice to every compiler invocation, if configured with --enable-Werror. The reason is the double expansion of the OVS_ENABLE_WERROR macro. It's called once from the top level in configure.ac and the second time from the AC_REQUIRE while checking CXX compatibility. AC_REQUIRE by itself protects from double expansion, but it can't protect from top level calls and it can not be used outside of AC_DEFUN. One way to fix that is to use AC_DEFUN_ONCE for OVS_ENABLE_WERROR, but it's not available in older autoconf < 2.64. So, creating a separate macro with AC_REQUIRE inside for the top level invocation to make it expanded only once. Acked-by: Ales Musil Signed-off-by: Ilya Maximets --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 59ea0a281..6f8679d7c 100644 --- a/configure.ac +++ b/configure.ac @@ -181,7 +181,7 @@ OVS_ENABLE_OPTION([-Wno-null-pointer-arithmetic]) OVS_ENABLE_OPTION([-Warray-bounds-pointer-arithmetic]) OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED]) OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER]) -OVS_ENABLE_WERROR +OVS_ENABLE_WERROR_TOP OVS_ENABLE_SPARSE OVS_CTAGS_IDENTIFIERS OVS_CHECK_DPCLS_AUTOVALIDATOR -- cgit v1.2.1