]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
feature-arm-vfp.inc: Allow hard-float on newer simd targets
authorMark Hatle <mark.hatle@amd.com>
Thu, 1 Feb 2024 20:45:51 +0000 (14:45 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Feb 2024 21:41:19 +0000 (21:41 +0000)
Currently hard-float is dependency upon the special TUNE_CCARGS_MFPU which
contains custom -mfpu= values.  However, newer 32-bit architectures like
cortex-r52 use 'simd' instead.  There is no 'simd' entry for -mfpu=
according to the GCC manual, it's more or less automatic based on the
cpu settings.

Add this as an exception to the TUNE_CCARGS_FLOAT setting of hard or softfp.

Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/machine/include/arm/feature-arm-vfp.inc

index 678888e6380b059bd95488c6b973342cd87d9b77..d020100daa6a797029c2190da21058b7c262ce78 100644 (file)
@@ -5,11 +5,12 @@
 TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit."
 TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}"
 
+# simd is special, we don't pass this to the -mfpu, it's implied
 TUNE_CCARGS  .= "${@ (' -mfpu=%s' % d.getVar('TUNE_CCARGS_MFPU').split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}"
 # The following deals with both vfpv3-d16 and vfpv4-d16
 ARMPKGSFX_FPU = "${@ ('-%s'       % d.getVar('TUNE_CCARGS_MFPU').split()[-1].replace('-d16', 'd16')) if (d.getVar('TUNE_CCARGS_MFPU') != '') else ''}"
 
 TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP."
-TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '') else '' }"
+TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU') != '' or bb.utils.contains('TUNE_FEATURES', 'simd', True, False, d)) else '' }"
 TUNE_CCARGS   .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT') != '')     else ''}"
 ARMPKGSFX_EABI = "${@ 'hf'                                 if (d.getVar('TUNE_CCARGS_MFLOAT') == 'hard') else ''}"