[PATCH 19.11 v2 3/3] net/ixgbe: build failure with make and clang 13

Christian Ehrhardt christian.ehrhardt at canonical.com
Wed Dec 15 14:34:18 CET 2021


On Wed, Dec 15, 2021 at 2:08 AM Haiyue Wang <haiyue.wang at 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 at 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


More information about the stable mailing list