patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 19.11] net/ice: build failure with make and GCC > 11
@ 2022-01-12  6:45 Steve Yang
  2022-01-13  7:57 ` Christian Ehrhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Yang @ 2022-01-12  6:45 UTC (permalink / raw)
  To: stable; +Cc: haiyue.wang, Steve Yang

Since GCC version is greater than 11.1.1, the '-finline-functions'
option perhaps causes '-Werror=maybe-uninitialized' issue.

Check the gcc version, and enable '-Wno-maybe-uninitialized',
otherwise it will have "error: ‘r_bitmap’ may be used uninitialized".

Bugzilla ID: 744

Signed-off-by: Steve Yang <stevex.yang@intel.com>
---
 drivers/net/ice/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile
index 6c4d155268..07044d6ed7 100644
--- a/drivers/net/ice/Makefile
+++ b/drivers/net/ice/Makefile
@@ -34,6 +34,10 @@ ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
 CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
 endif
 
+ifeq ($(shell test $(GCC_VERSION) -ge 110 && echo 1), 1)
+CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
+endif
+
 endif
 OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
 $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
-- 
2.27.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 19.11] net/ice: build failure with make and GCC > 11
  2022-01-12  6:45 [PATCH 19.11] net/ice: build failure with make and GCC > 11 Steve Yang
@ 2022-01-13  7:57 ` Christian Ehrhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Christian Ehrhardt @ 2022-01-13  7:57 UTC (permalink / raw)
  To: Steve Yang; +Cc: stable, haiyue.wang

On Wed, Jan 12, 2022 at 7:50 AM Steve Yang <stevex.yang@intel.com> wrote:
>
> Since GCC version is greater than 11.1.1, the '-finline-functions'
> option perhaps causes '-Werror=maybe-uninitialized' issue.
>
> Check the gcc version, and enable '-Wno-maybe-uninitialized',
> otherwise it will have "error: ‘r_bitmap’ may be used uninitialized".

Indeed the extended inlining might cause more detection of an issue like this.
Just disabling that warning for ICE will not make it worse, although unless that
detection is a false positive if there is a real fix to it avoiding
the dangerous
situation that would be even better.

For now I have queued the patch for 19.11.12

> Bugzilla ID: 744
>
> Signed-off-by: Steve Yang <stevex.yang@intel.com>
> ---
>  drivers/net/ice/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ice/Makefile b/drivers/net/ice/Makefile
> index 6c4d155268..07044d6ed7 100644
> --- a/drivers/net/ice/Makefile
> +++ b/drivers/net/ice/Makefile
> @@ -34,6 +34,10 @@ ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
>  CFLAGS_BASE_DRIVER += -Wno-unused-but-set-variable
>  endif
>
> +ifeq ($(shell test $(GCC_VERSION) -ge 110 && echo 1), 1)
> +CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
> +endif
> +
>  endif
>  OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c)))
>  $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER)))
> --
> 2.27.0
>


-- 
Christian Ehrhardt
Staff Engineer, Ubuntu Server
Canonical Ltd

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-13  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12  6:45 [PATCH 19.11] net/ice: build failure with make and GCC > 11 Steve Yang
2022-01-13  7:57 ` 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).