* [PATCH 19.11 v2 1/3] net/i40e: build failure with make and clang 13
@ 2021-12-15 0:35 Haiyue Wang
2021-12-15 0:35 ` [PATCH 19.11 v2 2/3] net/ice: " Haiyue Wang
2021-12-15 0:35 ` [PATCH 19.11 v2 3/3] net/ixgbe: " Haiyue Wang
0 siblings, 2 replies; 5+ messages in thread
From: Haiyue Wang @ 2021-12-15 0:35 UTC (permalink / raw)
To: stable
Cc: christian.ehrhardt, yux.jiang, qi.z.zhang, alialnu, Haiyue Wang,
Beilei Xing
Disable the -Wunused-but-set-variable option for clang to avoid
compile warning.
Bugzilla ID: 901
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/i40e/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 4ea58bd9e7..d6ced28f3d 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -35,6 +35,7 @@ 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
+CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
else
CFLAGS_BASE_DRIVER = -Wno-sign-compare
CFLAGS_BASE_DRIVER += -Wno-unused-value
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 19.11 v2 2/3] net/ice: build failure with make and clang 13
2021-12-15 0:35 [PATCH 19.11 v2 1/3] net/i40e: build failure with make and clang 13 Haiyue Wang
@ 2021-12-15 0:35 ` Haiyue Wang
2021-12-15 13:37 ` Christian Ehrhardt
2021-12-15 0:35 ` [PATCH 19.11 v2 3/3] net/ixgbe: " Haiyue Wang
1 sibling, 1 reply; 5+ messages in thread
From: Haiyue Wang @ 2021-12-15 0:35 UTC (permalink / raw)
To: stable
Cc: christian.ehrhardt, yux.jiang, qi.z.zhang, alialnu, Haiyue Wang,
Qiming Yang, Wenzhuo Lu
Disable the -Wunused-but-set-variable option for clang to avoid
compile warning.
Bugzilla ID: 902
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile
index 6c4d155268..370b33af60 100644
--- a/drivers/net/ice/Makefile
+++ b/drivers/net/ice/Makefile
@@ -26,6 +26,7 @@ CFLAGS_BASE_DRIVER +=
else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
CFLAGS_BASE_DRIVER += -Wno-unused-parameter
CFLAGS_BASE_DRIVER += -Wno-unused-variable
+CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
else
CFLAGS_BASE_DRIVER += -Wno-unused-parameter
CFLAGS_BASE_DRIVER += -Wno-unused-variable
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 19.11 v2 3/3] net/ixgbe: build failure with make and clang 13
2021-12-15 0:35 [PATCH 19.11 v2 1/3] net/i40e: build failure with make and clang 13 Haiyue Wang
2021-12-15 0:35 ` [PATCH 19.11 v2 2/3] net/ice: " Haiyue Wang
@ 2021-12-15 0:35 ` Haiyue Wang
2021-12-15 13:34 ` Christian Ehrhardt
1 sibling, 1 reply; 5+ messages in thread
From: Haiyue Wang @ 2021-12-15 0:35 UTC (permalink / raw)
To: stable
Cc: christian.ehrhardt, yux.jiang, qi.z.zhang, alialnu, Haiyue Wang,
Wenzhuo Lu, Konstantin Ananyev
Disable the -Wunused-but-set-variable option for clang to avoid
compile warning.
Bugzilla ID: 903
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ixgbe/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 31523025b3..31a418a2c6 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -29,6 +29,7 @@ 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
+CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
else
#
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 19.11 v2 3/3] net/ixgbe: build failure with make and clang 13
2021-12-15 0:35 ` [PATCH 19.11 v2 3/3] net/ixgbe: " Haiyue Wang
@ 2021-12-15 13:34 ` Christian Ehrhardt
0 siblings, 0 replies; 5+ messages in thread
From: Christian Ehrhardt @ 2021-12-15 13:34 UTC (permalink / raw)
To: Haiyue Wang
Cc: stable, yux.jiang, qi.z.zhang, alialnu, Wenzhuo Lu, Konstantin Ananyev
On Wed, Dec 15, 2021 at 2:08 AM Haiyue Wang <haiyue.wang@intel.com> wrote:
>
> Disable the -Wunused-but-set-variable option for clang to avoid
> compile warning.
Thanks,
this already is in the meson build btw.
And it is in the Makefile for some, but not all .c files.
I'm wondering as I'd have expected the existing:
drivers/net/ixgbe/Makefile:39:CFLAGS_ixgbe_common.o +=
-Wno-unused-but-set-variable
To avoid one of the two errors reported in bug 903.
Nevertheless I think adding those is
a) not totally new
b) only meant to make the older DPDK release more tolerant with new toolchains
c) already is globally enabled for ixgbe in the meson based build
(which is how it passed Ubuntu/Debian builds)
BTW (c) also is the reason we do not need to fix latest development branch.
There it has only meson and that does set it this way.
Therefore I think it is ok and I'll apply this patch - thank you.
> Bugzilla ID: 903
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
> drivers/net/ixgbe/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
> index 31523025b3..31a418a2c6 100644
> --- a/drivers/net/ixgbe/Makefile
> +++ b/drivers/net/ixgbe/Makefile
> @@ -29,6 +29,7 @@ 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
> +CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
>
> else
> #
> --
> 2.34.1
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 19.11 v2 2/3] net/ice: build failure with make and clang 13
2021-12-15 0:35 ` [PATCH 19.11 v2 2/3] net/ice: " Haiyue Wang
@ 2021-12-15 13:37 ` Christian Ehrhardt
0 siblings, 0 replies; 5+ messages in thread
From: Christian Ehrhardt @ 2021-12-15 13:37 UTC (permalink / raw)
To: Haiyue Wang
Cc: stable, yux.jiang, qi.z.zhang, alialnu, Qiming Yang, Wenzhuo Lu
On Wed, Dec 15, 2021 at 2:08 AM Haiyue Wang <haiyue.wang@intel.com> wrote:
>
> Disable the -Wunused-but-set-variable option for clang to avoid
> compile warning.
Agreed, as I explained on patch 3/3 this is not an issue for upstream
as meson builds already set that flag.
$ grep -Hrn -C 3 -- no-unused-but-set-variable | grep ice
drivers/net/ice/base/meson.build-14-]
drivers/net/ice/base/meson.build-15-
drivers/net/ice/base/meson.build-16-error_cflags = ['-Wno-unused-value',
drivers/net/ice/base/meson.build:17: '-Wno-unused-but-set-variable',
drivers/net/ice/base/meson.build-18- '-Wno-unused-variable',
drivers/net/ice/base/meson.build-19- '-Wno-unused-parameter',
drivers/net/ice/base/meson.build-20-]
drivers/net/ice/Makefile-31-CFLAGS_BASE_DRIVER += -Wno-unused-variable
drivers/net/ice/Makefile-32-
drivers/net/ice/Makefile-33-ifeq ($(shell test $(GCC_VERSION) -ge 44
&& echo 1), 1)
drivers/net/ice/Makefile:34:CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
drivers/net/ice/Makefile-35-endif
drivers/net/ice/Makefile-36-
drivers/net/ice/Makefile-37-endif
The resulting makefile will now set it in gcc newer than 4.4 and
globally on clang.
That is ok as older gcc's would fail due to the unknown option.
Applying to 19.11 LTS branch ...
> Bugzilla ID: 902
>
> Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
> ---
> drivers/net/ice/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile
> index 6c4d155268..370b33af60 100644
> --- a/drivers/net/ice/Makefile
> +++ b/drivers/net/ice/Makefile
> @@ -26,6 +26,7 @@ CFLAGS_BASE_DRIVER +=
> else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
> CFLAGS_BASE_DRIVER += -Wno-unused-parameter
> CFLAGS_BASE_DRIVER += -Wno-unused-variable
> +CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
> else
> CFLAGS_BASE_DRIVER += -Wno-unused-parameter
> CFLAGS_BASE_DRIVER += -Wno-unused-variable
> --
> 2.34.1
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-15 13:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 0:35 [PATCH 19.11 v2 1/3] net/i40e: build failure with make and clang 13 Haiyue Wang
2021-12-15 0:35 ` [PATCH 19.11 v2 2/3] net/ice: " Haiyue Wang
2021-12-15 13:37 ` Christian Ehrhardt
2021-12-15 0:35 ` [PATCH 19.11 v2 3/3] net/ixgbe: " Haiyue Wang
2021-12-15 13:34 ` Christian Ehrhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).