[PATCH 19.11 v1 3/3] net/ice: build failure with make and clang < 13
Christian Ehrhardt
christian.ehrhardt at canonical.com
Mon Jan 3 12:34:52 CET 2022
On Mon, Dec 20, 2021 at 12:21 PM Haiyue Wang <haiyue.wang at intel.com> wrote:
>
> Check the clang version before enabling '-Wno-unused-but-set-variable',
> otherwise it will have "error: unknown warning option".
Thanks, Queued for 19.11.11 as it improves some other recently added
compiler fixes and we'd want to avoid those breaking older clang
builds.
> https://reviews.llvm.org/D100581
>
> Bugzilla ID: 913
>
> Signed-off-by: Haiyue Wang <haiyue.wang at intel.com>
> ---
> drivers/net/ice/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile
> index 370b33af60..9cfd059781 100644
> --- a/drivers/net/ice/Makefile
> +++ b/drivers/net/ice/Makefile
> @@ -26,7 +26,9 @@ CFLAGS_BASE_DRIVER +=
> else ifeq ($(CONFIG_RTE_TOOLCHAIN_CLANG),y)
> CFLAGS_BASE_DRIVER += -Wno-unused-parameter
> 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-unused-parameter
> CFLAGS_BASE_DRIVER += -Wno-unused-variable
> --
> 2.34.1
>
--
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd
More information about the stable
mailing list