From patchwork Mon Oct 26 16:37:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Viktorin X-Patchwork-Id: 8034 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 361508F9E; Mon, 26 Oct 2015 17:39:49 +0100 (CET) Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id 477C18D8D for ; Mon, 26 Oct 2015 17:39:32 +0100 (CET) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3nl21w0Nnzz5GR; Mon, 26 Oct 2015 17:39:32 +0100 (CET) From: Jan Viktorin To: Thomas Monjalon , David Hunt , dev@dpdk.org Date: Mon, 26 Oct 2015 17:37:38 +0100 Message-Id: <1445877458-31052-17-git-send-email-viktorin@rehivetech.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1445877458-31052-1-git-send-email-viktorin@rehivetech.com> References: <1445877458-31052-1-git-send-email-viktorin@rehivetech.com> Subject: [dpdk-dev] [PATCH v2 16/16] acl: check for SSE 4.1 support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The main goal of this check is to avoid passing the -msse4.1 option to the GCC that does not support it (like arm toolchains). Anyway, the ACL library does not compile on ARM. Signed-off-by: Jan Viktorin --- lib/librte_acl/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_acl/Makefile b/lib/librte_acl/Makefile index 7a1cf8a..401fb8c 100644 --- a/lib/librte_acl/Makefile +++ b/lib/librte_acl/Makefile @@ -50,7 +50,11 @@ SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_gen.c SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_scalar.c SRCS-$(CONFIG_RTE_LIBRTE_ACL) += acl_run_sse.c +CC_SSE4_1_SUPPORT := $(shell $(CC) -msse4.1 -dM -E - < /dev/null >/dev/null 2>&1 && echo 1) + +ifeq ($(CC_SSE4_1_SUPPORT),1) CFLAGS_acl_run_sse.o += -msse4.1 +endif # # If the compiler supports AVX2 instructions,