From: Hiroyuki Mikita <h.mikita89@gmail.com>
To: wenzhuo.lu@intel.com, thomas.monjalon@6wind.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3] e1000: fix build with clang
Date: Thu, 26 May 2016 20:36:39 +0900 [thread overview]
Message-ID: <1464262599-28717-1-git-send-email-h.mikita89@gmail.com> (raw)
In-Reply-To: <1464189938-1769-1-git-send-email-h.mikita89@gmail.com>
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 <h.mikita89@gmail.com>
---
v3:
* use CONFIG_RTE_TOOLCHAIN_GCC
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..b5b803e 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 ($(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)
--
1.9.1
next prev parent reply other threads:[~2016-05-26 11:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 14:48 [dpdk-dev] [PATCH] " Hiroyuki Mikita
2016-05-25 0:35 ` Lu, Wenzhuo
2016-05-25 12:00 ` Thomas Monjalon
2016-05-25 15:25 ` [dpdk-dev] [PATCH v2] " Hiroyuki Mikita
2016-05-25 16:04 ` Thomas Monjalon
2016-05-25 16:21 ` Hiroyuki Mikita
2016-05-26 11:36 ` Hiroyuki Mikita [this message]
2016-06-10 9:50 ` [dpdk-dev] [PATCH v3] " Bruce Richardson
2016-06-10 9:55 ` Bruce Richardson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464262599-28717-1-git-send-email-h.mikita89@gmail.com \
--to=h.mikita89@gmail.com \
--cc=dev@dpdk.org \
--cc=thomas.monjalon@6wind.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).