[dpdk-dev,v2] ixgbe: fix build with gcc 5

Message ID b185ffdaacf91cf99f0d6442e7fcf9a3a736b7fb.1424783608.git.pmatilai@redhat.com (mailing list archive)
State Accepted, archived
Headers

Commit Message

Panu Matilainen Feb. 24, 2015, 1:13 p.m. UTC
  gcc 5 supports a new logical-not-parentheses warning which
ixgbe_common.c triggers, causing build failure with -Werror.
Since this source must not be modified, silence the warning instead.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
---
 lib/librte_pmd_ixgbe/Makefile | 4 ++++
 1 file changed, 4 insertions(+)
  

Comments

Ananyev, Konstantin Feb. 24, 2015, 1:45 p.m. UTC | #1
> -----Original Message-----
> From: Panu Matilainen [mailto:pmatilai@redhat.com]
> Sent: Tuesday, February 24, 2015 1:14 PM
> To: dev@dpdk.org
> Cc: Ananyev, Konstantin
> Subject: [PATCH v2] ixgbe: fix build with gcc 5
> 
> gcc 5 supports a new logical-not-parentheses warning which
> ixgbe_common.c triggers, causing build failure with -Werror.
> Since this source must not be modified, silence the warning instead.
> 
> Signed-off-by: Panu Matilainen <pmatilai@redhat.com>

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> ---
>  lib/librte_pmd_ixgbe/Makefile | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
> index 43870f7..9a5cd33 100644
> --- a/lib/librte_pmd_ixgbe/Makefile
> +++ b/lib/librte_pmd_ixgbe/Makefile
> @@ -71,6 +71,10 @@ CFLAGS_ixgbe_common.o += -Wno-unused-but-set-variable
>  CFLAGS_ixgbe_x550.o += -Wno-unused-but-set-variable -Wno-maybe-uninitialized
>  endif
> 
> +ifeq ($(shell test $(GCC_VERSION) -ge 50 && echo 1), 1)
> +CFLAGS_ixgbe_common.o += -Wno-logical-not-parentheses
> +endif
> +
>  ifeq ($(shell test $(GCC_VERSION) -le 46 && echo 1), 1)
>  CFLAGS_ixgbe_x550.o += -Wno-uninitialized
>  CFLAGS_ixgbe_phy.o += -Wno-uninitialized
> --
> 2.1.0
  
Thomas Monjalon Feb. 25, 2015, 3:26 p.m. UTC | #2
> > gcc 5 supports a new logical-not-parentheses warning which
> > ixgbe_common.c triggers, causing build failure with -Werror.
> > Since this source must not be modified, silence the warning instead.
> > 
> > Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
> 
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile
index 43870f7..9a5cd33 100644
--- a/lib/librte_pmd_ixgbe/Makefile
+++ b/lib/librte_pmd_ixgbe/Makefile
@@ -71,6 +71,10 @@  CFLAGS_ixgbe_common.o += -Wno-unused-but-set-variable
 CFLAGS_ixgbe_x550.o += -Wno-unused-but-set-variable -Wno-maybe-uninitialized
 endif
 
+ifeq ($(shell test $(GCC_VERSION) -ge 50 && echo 1), 1)
+CFLAGS_ixgbe_common.o += -Wno-logical-not-parentheses
+endif
+
 ifeq ($(shell test $(GCC_VERSION) -le 46 && echo 1), 1)
 CFLAGS_ixgbe_x550.o += -Wno-uninitialized
 CFLAGS_ixgbe_phy.o += -Wno-uninitialized