From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hiroyuki Mikita Subject: [PATCH v2] e1000: fix build with clang Date: Thu, 26 May 2016 00:25:38 +0900 Message-ID: <1464189938-1769-1-git-send-email-h.mikita89@gmail.com> References: <1464101290-28547-1-git-send-email-h.mikita89@gmail.com> Cc: dev@dpdk.org To: wenzhuo.lu@intel.com, thomas.monjalon@6wind.com Return-path: Received: from mail-pa0-f67.google.com (mail-pa0-f67.google.com [209.85.220.67]) by dpdk.org (Postfix) with ESMTP id 6B26E2BF1 for ; Wed, 25 May 2016 17:25:49 +0200 (CEST) Received: by mail-pa0-f67.google.com with SMTP id gp3so5643228pac.2 for ; Wed, 25 May 2016 08:25:49 -0700 (PDT) In-Reply-To: <1464101290-28547-1-git-send-email-h.mikita89@gmail.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- v2: * fix for cross compier drivers/net/e1000/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile index f4879e6..e845a8f 100644 --- a/drivers/net/e1000/Makefile +++ b/drivers/net/e1000/Makefile @@ -50,14 +50,16 @@ ifeq ($(CC), icc) 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 ($(findstring gcc, $(CC)), gcc) 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) -- 1.9.1