From patchwork Wed Oct 25 09:03:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 30848 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 832561B650; Wed, 25 Oct 2017 11:03:10 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id BBCA71B211 for ; Wed, 25 Oct 2017 11:03:08 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 25 Oct 2017 02:03:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.43,431,1503385200"; d="scan'208"; a="1235011682" Received: from silpixa00372839.ir.intel.com (HELO silpixa00372839.ger.corp.intel.com) ([10.237.222.154]) by fmsmga002.fm.intel.com with ESMTP; 25 Oct 2017 02:03:06 -0700 From: Ferruh Yigit To: Santosh Shukla , Jerin Jacob Cc: dev@dpdk.org, Ferruh Yigit Date: Wed, 25 Oct 2017 10:03:03 +0100 Message-Id: <20171025090304.67133-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] net/octeontx: fix build for gcc < 4.6 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -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 Acked-by: Santosh Shukla --- 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