* [dpdk-dev] [PATCH] e1000: fix build with clang
@ 2016-05-24 14:48 Hiroyuki Mikita
2016-05-25 0:35 ` Lu, Wenzhuo
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Hiroyuki Mikita @ 2016-05-24 14:48 UTC (permalink / raw)
To: wenzhuo.lu; +Cc: 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 <h.mikita89@gmail.com>
---
drivers/net/e1000/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/e1000/Makefile b/drivers/net/e1000/Makefile
index f4879e6..d580dea 100644
--- a/drivers/net/e1000/Makefile
+++ b/drivers/net/e1000/Makefile
@@ -50,11 +50,11 @@ 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 ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
+ifeq ($(shell test $(CC) = gcc && test $(GCC_VERSION) -ge 60 && echo 1), 1)
CFLAGS_BASE_DRIVER += -Wno-misleading-indentation
endif
endif
--
1.9.1
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] e1000: fix build with clang
2016-05-24 14:48 [dpdk-dev] [PATCH] e1000: fix build with clang 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
2 siblings, 0 replies; 9+ messages in thread
From: Lu, Wenzhuo @ 2016-05-25 0:35 UTC (permalink / raw)
To: Hiroyuki Mikita; +Cc: dev
Hi,
> -----Original Message-----
> From: Hiroyuki Mikita [mailto:h.mikita89@gmail.com]
> Sent: Tuesday, May 24, 2016 10:48 PM
> To: Lu, Wenzhuo
> Cc: dev@dpdk.org
> Subject: [PATCH] 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 <h.mikita89@gmail.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] e1000: fix build with clang
2016-05-24 14:48 [dpdk-dev] [PATCH] e1000: fix build with clang 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
2 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2016-05-25 12:00 UTC (permalink / raw)
To: Hiroyuki Mikita; +Cc: dev, wenzhuo.lu
2016-05-24 23:48, Hiroyuki Mikita:
> 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/
I did this patch but it looks broken for cross-compiler.
Please fix it. Thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH v2] e1000: fix build with clang
2016-05-24 14:48 [dpdk-dev] [PATCH] e1000: fix build with clang Hiroyuki Mikita
2016-05-25 0:35 ` Lu, Wenzhuo
2016-05-25 12:00 ` Thomas Monjalon
@ 2016-05-25 15:25 ` Hiroyuki Mikita
2016-05-25 16:04 ` Thomas Monjalon
2016-05-26 11:36 ` [dpdk-dev] [PATCH v3] " Hiroyuki Mikita
2 siblings, 2 replies; 9+ messages in thread
From: Hiroyuki Mikita @ 2016-05-25 15:25 UTC (permalink / raw)
To: wenzhuo.lu, thomas.monjalon; +Cc: 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 <h.mikita89@gmail.com>
---
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] e1000: fix build with clang
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 ` [dpdk-dev] [PATCH v3] " Hiroyuki Mikita
1 sibling, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2016-05-25 16:04 UTC (permalink / raw)
To: Hiroyuki Mikita; +Cc: wenzhuo.lu, dev
2016-05-26 00:25, Hiroyuki Mikita:
> 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>
> ---
> v2:
> * fix for cross compier
The output of git grep '(CC)' shows that there is some room for
cross-compilation fixes.
Any volunteer?
> +ifeq ($(findstring gcc, $(CC)), gcc)
> ifeq ($(shell test $(GCC_VERSION) -ge 60 && echo 1), 1)
Looks good, thanks
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH v3] e1000: fix build with clang
2016-05-25 15:25 ` [dpdk-dev] [PATCH v2] " Hiroyuki Mikita
2016-05-25 16:04 ` Thomas Monjalon
@ 2016-05-26 11:36 ` Hiroyuki Mikita
2016-06-10 9:50 ` Bruce Richardson
1 sibling, 1 reply; 9+ messages in thread
From: Hiroyuki Mikita @ 2016-05-26 11:36 UTC (permalink / raw)
To: wenzhuo.lu, thomas.monjalon; +Cc: 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 <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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] e1000: fix build with clang
2016-05-26 11:36 ` [dpdk-dev] [PATCH v3] " Hiroyuki Mikita
@ 2016-06-10 9:50 ` Bruce Richardson
2016-06-10 9:55 ` Bruce Richardson
0 siblings, 1 reply; 9+ messages in thread
From: Bruce Richardson @ 2016-06-10 9:50 UTC (permalink / raw)
To: Hiroyuki Mikita; +Cc: wenzhuo.lu, thomas.monjalon, dev
On Thu, May 26, 2016 at 08:36:39PM +0900, Hiroyuki Mikita wrote:
> 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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v3] e1000: fix build with clang
2016-06-10 9:50 ` Bruce Richardson
@ 2016-06-10 9:55 ` Bruce Richardson
0 siblings, 0 replies; 9+ messages in thread
From: Bruce Richardson @ 2016-06-10 9:55 UTC (permalink / raw)
To: Hiroyuki Mikita; +Cc: wenzhuo.lu, thomas.monjalon, dev
On Fri, Jun 10, 2016 at 10:50:50AM +0100, Bruce Richardson wrote:
> On Thu, May 26, 2016 at 08:36:39PM +0900, Hiroyuki Mikita wrote:
> > 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>
>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied to dpdk-next-net/rel_16_07
/Bruce
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-06-10 9:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 14:48 [dpdk-dev] [PATCH] e1000: fix build with clang 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 ` [dpdk-dev] [PATCH v3] " Hiroyuki Mikita
2016-06-10 9:50 ` Bruce Richardson
2016-06-10 9:55 ` Bruce Richardson
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).