DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] e1000: fix build with clang
@ 2016-05-24 14:48 Hiroyuki Mikita
  2016-05-25  0:35 ` Lu, Wenzhuo
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Hiroyuki Mikita @ 2016-05-24 14:48 UTC (permalink / raw)
  To: wenzhuo.lu; +Cc: dev

GCC_VERSION is empty in case of clang:
	/bin/sh: line 0: test: -ge: unary operator expected

It is the same issue as http://dpdk.org/dev/patchwork/patch/5994/

Fixes: 366113dbfb69 ("e1000: suppress misleading indentation warning")

Signed-off-by: Hiroyuki Mikita <h.mikita89@gmail.com>
---
 drivers/net/e1000/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index f4879e6..d580dea 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -50,11 +50,11 @@ ifeq ($(CC), icc)
 CFLAGS_BASE_DRIVER = -wd177 -wd181 -wd188 -wd869 -wd2259
 else
 #
-# CFLAGS for gcc
+# CFLAGS for gcc/clang
 #
 CFLAGS_BASE_DRIVER = -Wno-uninitialized -Wno-unused-parameter
 CFLAGS_BASE_DRIVER += -Wno-unused-variable
-ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
+ifeq ($(shell test $(CC) = gcc && test $(GCC_VERSION) -ge 60 && echo 1), 1)
 CFLAGS_BASE_DRIVER += -Wno-misleading-indentation
 endif
 endif
-- 
1.9.1

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

end of thread, other threads:[~2016-06-10  9:55 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 14:48 [dpdk-dev] [PATCH] e1000: fix build with clang Hiroyuki Mikita
2016-05-25  0:35 ` Lu, Wenzhuo
2016-05-25 12:00 ` Thomas Monjalon
2016-05-25 15:25 ` [dpdk-dev] [PATCH v2] " Hiroyuki Mikita
2016-05-25 16:04   ` Thomas Monjalon
2016-05-25 16:21     ` Hiroyuki Mikita
2016-05-26 11:36   ` [dpdk-dev] [PATCH v3] " Hiroyuki Mikita
2016-06-10  9:50     ` Bruce Richardson
2016-06-10  9:55       ` Bruce Richardson

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).