[dpdk-dev,1/2] e1000:fix gcc test for clang builds

Message ID 1466955137-91066-1-git-send-email-keith.wiles@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Wiles, Keith June 26, 2016, 3:32 p.m. UTC
  Signed-off-by: Keith Wiles <keith.wiles@intel.com>
---
 drivers/net/e1000/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Comments

Wiles, Keith June 26, 2016, 3:49 p.m. UTC | #1
On 6/26/16, 10:32 AM, "dev on behalf of Keith Wiles" <dev-bounces@dpdk.org on behalf of keith.wiles@intel.com> wrote:

>Signed-off-by: Keith Wiles <keith.wiles@intel.com>

>---

> drivers/net/e1000/Makefile | 5 ++++-

> 1 file changed, 4 insertions(+), 1 deletion(-)

>

>diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile

>index 5b801f5..1305163 100644

>--- a/drivers/net/e1000/Makefile

>+++ b/drivers/net/e1000/Makefile

>@@ -48,7 +48,7 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)

> # CFLAGS for icc

> #

> CFLAGS_BASE_DRIVER = -wd177 -wd181 -wd188 -wd869 -wd2259

>-else

>+else ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)

> #

> # CFLAGS for gcc

> #

>@@ -57,6 +57,9 @@ CFLAGS_BASE_DRIVER += -Wno-unused-variable

> ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)

> CFLAGS_BASE_DRIVER += -Wno-misleading-indentation

> endif

>+else

>+CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter

>+CFLAGS_BASE_DRIVER += -Wno-unused-variable

> endif


self-nak found another clang compiler problem.
> 

> #

>-- 

>2.8.0.GIT

>

>
  

Patch

diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index 5b801f5..1305163 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -48,7 +48,7 @@  ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y)
 # CFLAGS for icc
 #
 CFLAGS_BASE_DRIVER = -wd177 -wd181 -wd188 -wd869 -wd2259
-else
+else ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
 #
 # CFLAGS for gcc
 #
@@ -57,6 +57,9 @@  CFLAGS_BASE_DRIVER += -Wno-unused-variable
 ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
 CFLAGS_BASE_DRIVER += -Wno-misleading-indentation
 endif
+else
+CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter
+CFLAGS_BASE_DRIVER += -Wno-unused-variable
 endif
 
 #