DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ruifeng Wang <ruifeng.wang@arm.com>
To: Jerin Jacob <jerinj@marvell.com>,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Cc: dev@dpdk.org, nd@arm.com, Feifei Wang <feifei.wang2@arm.com>
Subject: [dpdk-dev] [PATCH v2 1/2] eal/arm: fix gcc build for optimization level 0
Date: Fri, 27 Nov 2020 18:15:13 +0800	[thread overview]
Message-ID: <20201127101514.47329-2-ruifeng.wang@arm.com> (raw)
In-Reply-To: <20201127101514.47329-1-ruifeng.wang@arm.com>

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 <feifei.wang2@arm.com>
Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
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


  reply	other threads:[~2020-11-27 10:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  8:09 [dpdk-dev] [PATCH 0/2] gcc build fix Ruifeng Wang
2020-11-27  8:09 ` [dpdk-dev] [PATCH 1/2] eal/arm: fix gcc build for optimization level 0 Ruifeng Wang
2020-11-27  8:39   ` David Marchand
2020-11-27  8:51     ` Jerin Jacob
2020-11-27  9:25       ` David Marchand
2020-11-27  9:33         ` Jerin Jacob
2020-11-27  9:45           ` David Marchand
2020-11-27 10:05             ` Ruifeng Wang
2020-11-27 10:28               ` Jerin Jacob
2020-11-27  9:39         ` Andrew Rybchenko
2020-11-27  9:36     ` Ruifeng Wang
2020-11-27  8:09 ` [dpdk-dev] [PATCH 2/2] net/igc: " Ruifeng Wang
2020-11-27  8:53   ` Jerin Jacob
2020-11-27  9:02   ` David Marchand
2020-11-27 12:13     ` David Marchand
2020-11-27 14:50       ` Wang, Haiyue
2020-11-27 10:15 ` [dpdk-dev] [PATCH v2 0/2] gcc build fix Ruifeng Wang
2020-11-27 10:15   ` Ruifeng Wang [this message]
2020-11-27 13:03     ` [dpdk-dev] [PATCH v2 1/2] eal/arm: fix gcc build for optimization level 0 Ruifeng Wang
2020-11-27 10:15   ` [dpdk-dev] [PATCH v2 2/2] net/igc: " Ruifeng Wang
2020-11-27 13:35   ` [dpdk-dev] [PATCH v2 0/2] gcc build fix Thomas Monjalon
2020-11-27 14:08     ` Ruifeng Wang
2020-11-27 16:03 ` [dpdk-dev] [PATCH " Thomas Monjalon

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=20201127101514.47329-2-ruifeng.wang@arm.com \
    --to=ruifeng.wang@arm.com \
    --cc=dev@dpdk.org \
    --cc=feifei.wang2@arm.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.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).