From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D505BA0524; Fri, 27 Nov 2020 11:15:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3007DC94E; Fri, 27 Nov 2020 11:15:41 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id E1F3FC940 for ; Fri, 27 Nov 2020 11:15:38 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5F3681516; Fri, 27 Nov 2020 02:15:38 -0800 (PST) Received: from net-arm-kp920-01.shanghai.arm.com (net-arm-kp920-01.shanghai.arm.com [10.169.210.104]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2B6FD3F71F; Fri, 27 Nov 2020 02:15:35 -0800 (PST) From: Ruifeng Wang To: Jerin Jacob , Ruifeng Wang , Honnappa Nagarahalli Cc: dev@dpdk.org, nd@arm.com, Feifei Wang Date: Fri, 27 Nov 2020 18:15:13 +0800 Message-Id: <20201127101514.47329-2-ruifeng.wang@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201127101514.47329-1-ruifeng.wang@arm.com> References: <20201127080903.26817-1-ruifeng.wang@arm.com> <20201127101514.47329-1-ruifeng.wang@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/2] eal/arm: fix gcc build for optimization level 0 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" Gcc build with '-O0' on platforms with RTE_ARM_FEATURE_ATOMICS set failed for: ../lib/librte_efd/rte_efd.c Assembler messages: 3866: Error: selected processor does not support `crc32cb w0,w0,w1' 3890: Error: selected processor does not support `crc32ch w0,w0,w1' 3914: Error: selected processor does not support `crc32cw w0,w0,w1' 3938: Error: selected processor does not support `crc32cx w0,w0,x1' This was caused by an architecture specifier added for Clang. Unlike Clang, Gcc considers each inline assembly block to be dependent and therefore, the architecture specifier impacts assemble of some blocks require certain extension support. Used arch_extension instead to not override architecture. Referred for [1] to fix the issue. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=dd1f6308b28edf0452dd5dc7877992903ec61e69 Fixes: 8fce34cd0a6a ("eal/arm: fix clang build of native target") Reported-by: Feifei Wang Signed-off-by: Ruifeng Wang --- v2: New approach to use arch_extension instead. lib/librte_eal/arm/include/rte_atomic_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h index 7fcd17466..6584bc38c 100644 --- a/lib/librte_eal/arm/include/rte_atomic_64.h +++ b/lib/librte_eal/arm/include/rte_atomic_64.h @@ -46,7 +46,7 @@ rte_atomic_thread_fence(int memorder) /*------------------------ 128 bit atomic operations -------------------------*/ #if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS) -#define __LSE_PREAMBLE ".arch armv8-a+lse\n" +#define __LSE_PREAMBLE ".arch_extension lse\n" #define __ATOMIC128_CAS_OP(cas_op_name, op_string) \ static __rte_noinline rte_int128_t \ -- 2.20.1