From: Thomas Monjalon Date: Tue, 30 Jun 2015 22:14:25 +0000 (+0200) Subject: cxgbe: fix build with clang X-Git-Tag: spdx-start~8907 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c55e94f560ef5c9fcee4584952de1d0bd414aece;p=dpdk.git cxgbe: fix build with clang 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 --- diff --git a/drivers/net/cxgbe/Makefile b/drivers/net/cxgbe/Makefile index 4dfc6b029d..ae12d75226 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