Following dpdk commits [1]-[3], it is now possible to compile with
--enable-Werror. Change the default to on, with an option to disable
using --disable-Werror.
Notes:
1. To compile against 21.11-rc1, need to apply [4] and [5] patches.
2. There are still sparse errors, due to dpdk issue. [6] fixes it.
[1] a3f8d0587188 ("net: avoid cast-align warning in VLAN insert function")
[2] da0333c8790b ("mbuf: avoid cast-align warning in data offset macro")
[3] 6de430b7079e ("eal/x86: avoid cast-align warning in memcpy functions")
[4] https://patchwork.ozlabs.org/project/openvswitch/list/?series=268844
[5] https://patchwork.ozlabs.org/project/openvswitch/list/?series=261231
[6]
https://patches.dpdk.org/project/dpdk/patch/[email protected]/
Signed-off-by: Eli Britstein <[email protected]>
Reviewed-by: Gaetan Rivet <[email protected]>
---
.ci/linux-build.sh | 1 -
.cirrus.yml | 2 +-
acinclude.m4 | 4 ++--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index e20cc6ad0..03178562b 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -5,7 +5,6 @@ set -x
CFLAGS_FOR_OVS="-g -O2"
SPARSE_FLAGS=""
-EXTRA_OPTS="--enable-Werror"
[ -z "$DPDK_EXPERIMENTAL" ] || DPDK=1
[ -z "$DPDK_SHARED" ] || DPDK=1
diff --git a/.cirrus.yml b/.cirrus.yml
index 358f2ba25..6d9454978 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -23,7 +23,7 @@ freebsd_build_task:
configure_script:
- ./boot.sh
- ./configure CC=${COMPILER} CFLAGS="-g -O2 -Wall"
- MAKE=gmake --enable-Werror
+ MAKE=gmake
|| { cat config.log; exit 1; }
build_script:
diff --git a/acinclude.m4 b/acinclude.m4
index dba365ea1..900ce8b77 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -89,8 +89,8 @@ dnl OVS_ENABLE_WERROR
AC_DEFUN([OVS_ENABLE_WERROR],
[AC_ARG_ENABLE(
[Werror],
- [AC_HELP_STRING([--enable-Werror], [Add -Werror to CFLAGS])],
- [], [enable_Werror=no])
+ [AC_HELP_STRING([--disable-Werror], [Remove -Werror from CFLAGS])],
+ [], [enable_Werror=yes])
AC_CONFIG_COMMANDS_PRE(
[if test "X$enable_Werror" = Xyes; then
OVS_CFLAGS="$OVS_CFLAGS -Werror"
--
2.28.0.2311.g225365fb51
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev