[PATCH 19.11 v1 1/3] net/ixgbe: build failure with make and clang < 13
Haiyue Wang
haiyue.wang at intel.com
Mon Dec 20 11:48:03 CET 2021
Check the clang version before enabling '-Wno-unused-but-set-variable',
otherwise it will have "error: unknown warning option".
https://reviews.llvm.org/D100581
Bugzilla ID: 913
Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
---
drivers/net/ixgbe/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 31a418a2c6..c730bbddb4 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -29,7 +29,9 @@ else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
#
CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args
+ifeq ($(shell test $(CLANG_MAJOR_VERSION) -ge 13 && echo 1), 1)
CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
+endif
else
#
--
2.34.1
More information about the stable
mailing list