[dpdk-dev] cxgbe: fix build with clang

Message ID 1435702894-11781-1-git-send-email-thomas.monjalon@6wind.com (mailing list archive)
State Accepted, archived
Commit c55e94f
Headers

Commit Message

Thomas Monjalon June 30, 2015, 10:21 p.m. UTC
  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.
  

Patch

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