From c55e94f560ef5c9fcee4584952de1d0bd414aece Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Wed, 1 Jul 2015 00:14:25 +0200 Subject: [PATCH] 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 --- drivers/net/cxgbe/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.20.1