From: Hiroyuki Mikita Date: Thu, 26 May 2016 11:36:39 +0000 (+0900) Subject: net/e1000: fix build with clang X-Git-Tag: spdx-start~6548 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4321f1c604150f5585480de71336e6e382ef16be;p=dpdk.git net/e1000: fix build with clang 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 Acked-by: Bruce Richardson --- diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile index 5b801f5666..57a60f0fcc 100644 --- a/drivers/net/e1000/Makefile +++ b/drivers/net/e1000/Makefile @@ -50,14 +50,16 @@ ifeq ($(CONFIG_RTE_TOOLCHAIN_ICC),y) 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 ($(CONFIG_RTE_TOOLCHAIN_GCC),y) ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1) CFLAGS_BASE_DRIVER += -Wno-misleading-indentation endif endif +endif # # Add extra flags for base driver files (also known as shared code)