patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 20.11] config/arm: replace native machine args
@ 2021-02-19 10:57 luca.boccassi
  2021-02-19 11:06 ` Juraj Linkeš
  0 siblings, 1 reply; 15+ messages in thread
From: luca.boccassi @ 2021-02-19 10:57 UTC (permalink / raw)
  To: stable; +Cc: juraj.linkes, jerinj, ruifeng.wang, david.marchand

From: Juraj Linkeš <juraj.linkes@pantheon.tech>

[ backported from upstream commit 9186e5a07f35ae74a1f7fa2d89671b5f77eae407 ]

There are compiler issues when building with -mcpu=native with popular
compilers, such as GCC-8.4:
In file included from ../lib/librte_eal/arm/include/rte_vect.h:11,
                 from ../lib/librte_net/net_crc_neon.c:10:
../lib/librte_net/net_crc_neon.c: In function ‘crcr32_folding_round’:
/usr/lib/gcc/aarch64-linux-gnu/8/include/arm_neon.h:26094:1: error:
inlining failed in call to always_inline ‘vmull_p64’:
target specific option mismatch
 vmull_p64 (poly64_t a, poly64_t b)
../lib/librte_net/net_crc_neon.c:50:20: note: called from here
  uint64x2_t tmp1 = vreinterpretq_u64_p128(vmull_p64(
    vgetq_lane_p64(vreinterpretq_p64_u64(fold), 0),
    vgetq_lane_p64(vreinterpretq_p64_u64(precomp), 1)));

and clang:
gcc -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS
clang-9 -E -dM -mcpu="native" - < /dev/null | grep __ARM_FEATURE_ATOMICS
<no output> # no clang support

Fix this by always specifying the proper machine args and never using
the native flags.

Fixes: 78ac8eac7e8a ("config/arm: use native machine build arguments")

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
---
This is a crude backport, but it fixes the build for arm64. It's a
release blocker for 20.11.1, so I would appreciate a quick review.
Thanks!

 config/arm/meson.build | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 42b4e43c74..8beae4a3f9 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -5,7 +5,6 @@
 # for checking defines we need to use the correct compiler flags
 march_opt = '-march=@0@'.format(machine)
 
-arm_force_native_march = false
 arm_force_default_march = (machine == 'default')
 
 flags_common_default = [
@@ -92,7 +91,6 @@ flags_n1generic_extra = [
 
 machine_args_generic = [
 	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
-	['native', ['-march=native']],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
 	['0xd07', ['-mcpu=cortex-a57']],
@@ -104,7 +102,6 @@ machine_args_generic = [
 
 machine_args_cavium = [
 	['default', ['-march=armv8-a+crc+crypto','-mcpu=thunderx']],
-	['native', ['-march=native']],
 	['0xa1', ['-mcpu=thunderxt88'], flags_thunderx_extra],
 	['0xa2', ['-mcpu=thunderxt81'], flags_thunderx_extra],
 	['0xa3', ['-mcpu=thunderxt83'], flags_thunderx_extra],
@@ -112,8 +109,7 @@ machine_args_cavium = [
 	['0xb2', ['-march=armv8.2-a+crc+crypto+lse','-mcpu=octeontx2'], flags_octeontx2_extra]]
 
 machine_args_emag = [
-	['default', ['-march=armv8-a+crc+crypto', '-mtune=emag']],
-	['native', ['-march=native']]]
+	['default', ['-march=armv8-a+crc+crypto', '-mtune=emag']]]
 
 ## Arm implementer ID (ARM DDI 0487C.a, Section G7.2.106, Page G7-5321)
 impl_generic = ['Generic armv8', flags_generic, machine_args_generic]
@@ -167,9 +163,6 @@ else
 			cmd_output = cmd_generic
 		endif
 		impl_pn = cmd_output[3]
-		if arm_force_native_march == true
-			impl_pn = 'native'
-		endif
 	else
 		impl_id = meson.get_cross_property('implementor_id', 'generic')
 		impl_pn = meson.get_cross_property('implementor_pn', 'default')
-- 
2.29.2


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-03-08 18:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 10:57 [dpdk-stable] [PATCH 20.11] config/arm: replace native machine args luca.boccassi
2021-02-19 11:06 ` Juraj Linkeš
2021-02-19 11:33   ` Luca Boccassi
2021-02-19 12:10     ` Juraj Linkeš
2021-02-19 13:04       ` Luca Boccassi
2021-02-24 12:51         ` Juraj Linkeš
2021-02-20  3:42       ` Ruifeng Wang
2021-02-25 12:14         ` Jerin Jacob Kollanukkaran
2021-02-25 14:24           ` David Marchand
2021-03-01  5:40           ` Ruifeng Wang
2021-03-07 13:35             ` Jerin Jacob Kollanukkaran
2021-03-08  3:23               ` Ruifeng Wang
2021-03-08 12:08                 ` Luca Boccassi
2021-03-08 18:51                   ` [dpdk-stable] [dpdk-dev] " Jerin Jacob
2021-03-08 18:48                 ` Jerin Jacob

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).