From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] cxgbe: fix build with clang
Date: Wed, 1 Jul 2015 00:21:34 +0200 [thread overview]
Message-ID: <1435702894-11781-1-git-send-email-thomas.monjalon@6wind.com> (raw)
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 <thomas.monjalon@6wind.com>
---
drivers/net/cxgbe/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
This patch is already applied.
diff --git a/drivers/net/cxgbe/Makefile b/drivers/net/cxgbe/Makefile
index 4dfc6b0..ae12d75 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.4.2
reply other threads:[~2015-06-30 22:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1435702894-11781-1-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
--cc=rahul.lakkireddy@chelsio.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).