DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: bruce.richardson@intel.com, thomas@monjalon.net,
	Ruifeng.Wang@arm.com, Honnappa.Nagarahalli@arm.com,
	jerinjacobk@gmail.com, ferruh.yigit@intel.com
Cc: dev@dpdk.org, "Juraj Linkeš" <juraj.linkes@pantheon.tech>
Subject: [dpdk-dev] [RFC PATCH v1] config/arm: fix native machine args
Date: Mon,  1 Feb 2021 15:55:13 +0100	[thread overview]
Message-ID: <1612191313-7654-1-git-send-email-juraj.linkes@pantheon.tech> (raw)

There are compiler issues when building with -mcpu=native with popular
compilers, such as GCC-8.4 and clang (which doesn't define
__ARM_FEATURE_ATOMIC). Fix this by always specifying the proper machine
args and never using the native flags.

Fixes: 78ac8eac7e8a ("config/arm: use native machine build arguments")
Cc: juraj.linkes@pantheon.tech

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index f207e5a288..f948768578 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -24,7 +24,6 @@ flags_common = [
 	['RTE_ARCH_ARM64', true],
 	['RTE_CACHE_LINE_SIZE', 128]
 ]
-native_machine_args = ['-mcpu=native']
 
 ## Part numbers are specific to Arm implementers
 # implementer specific aarch64 flags have middle priority
@@ -193,7 +192,6 @@ if dpdk_conf.get('RTE_ARCH_32')
 	machine_args += '-mfpu=neon'
 else
 	# aarch64 build
-	use_native_machine_args = false
 	if not meson.is_cross_build()
 		if machine == 'default'
 			# default build
@@ -213,7 +211,6 @@ else
 			else
 				error('Error when getting Arm Implementer ID and part number.')
 			endif
-			use_native_machine_args = true
 		endif
 	else
 		# cross build
@@ -249,12 +246,7 @@ else
 
 	# apply supported machine args
 	machine_args = [] # Clear previous machine args
-	if use_native_machine_args
-		candidate_machine_args = native_machine_args
-	else
-		candidate_machine_args = part_number_config['machine_args']
-	endif
-	foreach flag: candidate_machine_args
+	foreach flag: part_number_config['machine_args']
 		if cc.has_argument(flag)
 			machine_args += flag
 		endif
-- 
2.20.1


             reply	other threads:[~2021-02-01 14:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 14:55 Juraj Linkeš [this message]
2021-02-01 15:16 ` Thomas Monjalon
2021-02-02  7:40   ` Juraj Linkeš
2021-02-02  9:05 ` [dpdk-dev] [RFC PATCH v2] config/arm: replace " Juraj Linkeš
2021-02-02  9:25   ` 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=1612191313-7654-1-git-send-email-juraj.linkes@pantheon.tech \
    --to=juraj.linkes@pantheon.tech \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinjacobk@gmail.com \
    --cc=thomas@monjalon.net \
    /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).