[PATCH 19.11 v1 2/3] net/i40e: build failure with make and clang < 13
Haiyue Wang
haiyue.wang at intel.com
Mon Dec 20 11:48:04 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/i40e/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index d6ced28f3d..3f7565fbd6 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -35,7 +35,9 @@ CFLAGS_BASE_DRIVER += -Wno-missing-field-initializers
CFLAGS_BASE_DRIVER += -Wno-pointer-to-int-cast
CFLAGS_BASE_DRIVER += -Wno-format-nonliteral
CFLAGS_BASE_DRIVER += -Wno-unused-variable
+ifeq ($(shell test $(CLANG_MAJOR_VERSION) -ge 13 && echo 1), 1)
CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
+endif
else
CFLAGS_BASE_DRIVER = -Wno-sign-compare
CFLAGS_BASE_DRIVER += -Wno-unused-value
--
2.34.1
More information about the stable
mailing list