diff mbox series

[v13,4/7] build: add aarch32 meson build flags

Message ID 1615279005-30278-5-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series aarch64 -> aarch32 cross compilation support | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš March 9, 2021, 8:36 a.m. UTC
Add aarch32 extra build flags and aarch32 machine flags to generic
machine args.
Also modify how arm flags are updated in meson build - for 32-bit build,
update only if cross-compiling.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Acked-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 config/arm/meson.build | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 00bc4610a3..0f14741ebe 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -69,7 +69,14 @@  part_number_config_arm = {
 			['RTE_ARM_FEATURE_ATOMICS', true],
 			['RTE_MAX_LCORE', 64]
 		]
-	}
+	},
+	'aarch32': {
+		'machine_args': ['-march=armv8-a',
+				 '-mfpu=neon'],
+		'flags': [
+			['RTE_ARCH_ARM_NEON_MEMCPY', false],
+			['RTE_ARCH_STRICT_ALIGN', true]
+		]}
 }
 implementer_arm = {
 	'description': 'Arm',
@@ -199,14 +206,23 @@  implementers = {
 dpdk_conf.set('RTE_ARCH_ARM', 1)
 dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
 
+update_flags = false
 if dpdk_conf.get('RTE_ARCH_32')
 	# armv7 build
 	dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
 	dpdk_conf.set('RTE_ARCH_ARMv7', 1)
-	# the minimum architecture supported, armv7-a, needs the following,
-	machine_args += '-mfpu=neon'
+	if meson.is_cross_build()
+		update_flags = true
+		implementer_id = meson.get_cross_property('implementer_id')
+		part_number = meson.get_cross_property('part_number')
+		flags_common = []
+	else
+		# the minimum architecture supported, armv7-a, needs the following,
+		machine_args += '-mfpu=neon'
+	endif
 else
 	# aarch64 build
+	update_flags = true
 	if not meson.is_cross_build()
 		if machine == 'default'
 			# default build
@@ -232,7 +248,9 @@  else
 		implementer_id = meson.get_cross_property('implementer_id')
 		part_number = meson.get_cross_property('part_number')
 	endif
+endif
 
+if update_flags
 	if implementers.has_key(implementer_id)
 		implementer_config = implementers[implementer_id]
 	else