* [dpdk-dev] [PATCH] cxgbe: fix build with clang
@ 2015-06-30 22:21 Thomas Monjalon
0 siblings, 0 replies; only message in thread
From: Thomas Monjalon @ 2015-06-30 22:21 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: dev
GCC_VERSION is empty in case of clang:
/bin/sh: line 0: test: -ge: unary operator expected
It cannot be quoted because an integer is expected.
So the fix is to check empty value in a separate test.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
drivers/net/cxgbe/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
This patch is already applied.
diff --git a/drivers/net/cxgbe/Makefile b/drivers/net/cxgbe/Makefile
index 4dfc6b0..ae12d75 100644
--- a/drivers/net/cxgbe/Makefile
+++ b/drivers/net/cxgbe/Makefile
@@ -52,9 +52,9 @@ ifeq ($(CC), icc)
CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
else
#
-# CFLAGS for gcc
+# CFLAGS for gcc/clang
#
-ifeq ($(shell test $(GCC_VERSION) -ge 44 && echo 1), 1)
+ifeq ($(shell test $(CC) = gcc && test $(GCC_VERSION) -ge 44 && echo 1), 1)
CFLAGS += -Wno-deprecated
endif
CFLAGS_BASE_DRIVER = -Wno-unused-parameter -Wno-unused-value
--
2.4.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-06-30 22:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-30 22:21 [dpdk-dev] [PATCH] cxgbe: fix build with clang Thomas Monjalon
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).