From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Santosh Shukla <santosh.shukla@caviumnetworks.com>,
Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/octeontx: fix build for gcc < 4.6
Date: Wed, 25 Oct 2017 18:17:46 +0100 [thread overview]
Message-ID: <20171025171746.64844-1-ferruh.yigit@intel.com> (raw)
In-Reply-To: <20171025090304.67133-1-ferruh.yigit@intel.com>
-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
next prev parent reply other threads:[~2017-10-25 17:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-25 9:03 [dpdk-dev] [PATCH] " Ferruh Yigit
2017-10-25 9:09 ` santosh
2017-10-25 17:17 ` Ferruh Yigit [this message]
2017-10-25 18:29 ` [dpdk-dev] [PATCH v2] " Ferruh Yigit
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=20171025171746.64844-1-ferruh.yigit@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
--cc=santosh.shukla@caviumnetworks.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).