* [dpdk-dev] [PATCH] net/octeontx: fix build for gcc < 4.6
@ 2017-10-25 9:03 Ferruh Yigit
2017-10-25 9:09 ` santosh
2017-10-25 17:17 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
0 siblings, 2 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-10-25 9:03 UTC (permalink / raw)
To: Santosh Shukla, Jerin Jacob; +Cc: dev, Ferruh Yigit
-Ofast option supported starting from gcc4.6 [1], for older versions
using "-O3 -ffast-math" instead.
[1] build error:
CC octeontx_rxtx.o
cc1: error: invalid option argument ‘-Ofast’
Fixes: 9e747589bd4c ("net/octeontx: add packet transmit burst function")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
drivers/net/octeontx/Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile
index 0a8775a16..6197b66f4 100644
--- a/drivers/net/octeontx/Makefile
+++ b/drivers/net/octeontx/Makefile
@@ -59,7 +59,12 @@ SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_ethdev.c
ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
CFLAGS_octeontx_rxtx.o += -fno-prefetch-loop-arrays
endif
+
+ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
CFLAGS_octeontx_rxtx.o += -O3 -Ofast
+else
+CFLAGS_octeontx_rxtx.o += -O3 -ffast-math
+endif
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
--
2.13.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/octeontx: fix build for gcc < 4.6
2017-10-25 9:03 [dpdk-dev] [PATCH] net/octeontx: fix build for gcc < 4.6 Ferruh Yigit
@ 2017-10-25 9:09 ` santosh
2017-10-25 17:17 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
1 sibling, 0 replies; 4+ messages in thread
From: santosh @ 2017-10-25 9:09 UTC (permalink / raw)
To: Ferruh Yigit, Jerin Jacob; +Cc: dev
On Wednesday 25 October 2017 02:33 PM, Ferruh Yigit wrote:
> -Ofast option supported starting from gcc4.6 [1], for older versions
> using "-O3 -ffast-math" instead.
>
> [1] build error:
> CC octeontx_rxtx.o
> cc1: error: invalid option argument ‘-Ofast’
>
> Fixes: 9e747589bd4c ("net/octeontx: add packet transmit burst function")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] net/octeontx: fix build for gcc < 4.6
2017-10-25 9:03 [dpdk-dev] [PATCH] net/octeontx: fix build for gcc < 4.6 Ferruh Yigit
2017-10-25 9:09 ` santosh
@ 2017-10-25 17:17 ` Ferruh Yigit
2017-10-25 18:29 ` Ferruh Yigit
1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2017-10-25 17:17 UTC (permalink / raw)
To: Santosh Shukla, Jerin Jacob; +Cc: dev, Ferruh Yigit
-Ofast option supported starting from gcc4.6 [1], for older versions
using "-O3 -ffast-math" instead.
[1] build error:
CC octeontx_rxtx.o
cc1: error: invalid option argument ‘-Ofast’
Fixes: 9e747589bd4c ("net/octeontx: add packet transmit burst function")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
---
v2:
* version check should be only for gcc
* Kept Ack from Santosh
---
drivers/net/octeontx/Makefile | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/net/octeontx/Makefile b/drivers/net/octeontx/Makefile
index 0a8775a16..30fb459af 100644
--- a/drivers/net/octeontx/Makefile
+++ b/drivers/net/octeontx/Makefile
@@ -58,8 +58,16 @@ SRCS-$(CONFIG_RTE_LIBRTE_OCTEONTX_PMD) += octeontx_ethdev.c
ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y)
CFLAGS_octeontx_rxtx.o += -fno-prefetch-loop-arrays
+
+ifeq ($(shell test $(GCC_VERSION) -ge 46 && echo 1), 1)
+CFLAGS_octeontx_rxtx.o += -O3 -Ofast
+else
+CFLAGS_octeontx_rxtx.o += -O3 -ffast-math
endif
+
+else
CFLAGS_octeontx_rxtx.o += -O3 -Ofast
+endif
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_ethdev -lrte_net -lrte_kvargs
--
2.13.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/octeontx: fix build for gcc < 4.6
2017-10-25 17:17 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
@ 2017-10-25 18:29 ` Ferruh Yigit
0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2017-10-25 18:29 UTC (permalink / raw)
To: Santosh Shukla, Jerin Jacob; +Cc: dev
On 10/25/2017 10:17 AM, Ferruh Yigit wrote:
> -Ofast option supported starting from gcc4.6 [1], for older versions
> using "-O3 -ffast-math" instead.
>
> [1] build error:
> CC octeontx_rxtx.o
> cc1: error: invalid option argument ‘-Ofast’
>
> Fixes: 9e747589bd4c ("net/octeontx: add packet transmit burst function")
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-25 18:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-25 9:03 [dpdk-dev] [PATCH] net/octeontx: fix build for gcc < 4.6 Ferruh Yigit
2017-10-25 9:09 ` santosh
2017-10-25 17:17 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
2017-10-25 18:29 ` Ferruh Yigit
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).