From: Ruifeng Wang Date: Fri, 27 Nov 2020 08:09:02 +0000 (+0800) Subject: eal/arm: fix build with gcc optimization level 0 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d123fd111a161cd4f320ffb551a832cc4ce8c3ab;p=dpdk.git eal/arm: fix build with gcc optimization level 0 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. Removed the architecture for GCC to fix the issue. Fixes: 8fce34cd0a6a ("eal/arm: fix clang build of native target") Cc: stable@dpdk.org Reported-by: Feifei Wang Signed-off-by: Ruifeng Wang Acked-by: Jerin Jacob --- diff --git a/lib/librte_eal/arm/include/rte_atomic_64.h b/lib/librte_eal/arm/include/rte_atomic_64.h index 7fcd174661..467d32a455 100644 --- a/lib/librte_eal/arm/include/rte_atomic_64.h +++ b/lib/librte_eal/arm/include/rte_atomic_64.h @@ -46,7 +46,11 @@ rte_atomic_thread_fence(int memorder) /*------------------------ 128 bit atomic operations -------------------------*/ #if defined(__ARM_FEATURE_ATOMICS) || defined(RTE_ARM_FEATURE_ATOMICS) +#if defined(RTE_CC_CLANG) #define __LSE_PREAMBLE ".arch armv8-a+lse\n" +#else +#define __LSE_PREAMBLE "" +#endif #define __ATOMIC128_CAS_OP(cas_op_name, op_string) \ static __rte_noinline rte_int128_t \