patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
To: Haiyue Wang <haiyue.wang@intel.com>
Cc: stable@dpdk.org, yux.jiang@intel.com, qi.z.zhang@intel.com,
	 alialnu@nvidia.com, Qiming Yang <qiming.yang@intel.com>,
	 Wenzhuo Lu <wenzhuo.lu@intel.com>
Subject: Re: [PATCH 19.11 v2 2/3] net/ice: build failure with make and clang 13
Date: Wed, 15 Dec 2021 14:37:20 +0100	[thread overview]
Message-ID: <CAATJJ0L70iF3q0L3Qg0P+2+wg_ANwcum4O8OOyqsQh24s0eX_w@mail.gmail.com> (raw)
In-Reply-To: <20211215003544.371084-2-haiyue.wang@intel.com>

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

  reply	other threads:[~2021-12-15 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15  0:35 [PATCH 19.11 v2 1/3] net/i40e: " Haiyue Wang
2021-12-15  0:35 ` [PATCH 19.11 v2 2/3] net/ice: " Haiyue Wang
2021-12-15 13:37   ` Christian Ehrhardt [this message]
2021-12-15  0:35 ` [PATCH 19.11 v2 3/3] net/ixgbe: " Haiyue Wang
2021-12-15 13:34   ` Christian Ehrhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAATJJ0L70iF3q0L3Qg0P+2+wg_ANwcum4O8OOyqsQh24s0eX_w@mail.gmail.com \
    --to=christian.ehrhardt@canonical.com \
    --cc=alialnu@nvidia.com \
    --cc=haiyue.wang@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    --cc=yux.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).