Correct and improve the ARM tunings
cover Correct and improve the ARM tunings
These patches are intended to improve the ARM tunings and came about after I had to study the tune files a lot more than I first had anticipated...
The first patch (arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-*) avoids odd architectures such as "crc" and "crypto" to be included in PACKAGE_EXTRA_ARCHS.
The following three patches (where i have sent the latter two to the list before) restores the "armv*" features to TUNE_FEATURES for all ARM based SoCs as it does not make sense to remove them from the SoC specific tune files just to determine whether -mcpu or -march shall be used. This is because the SoCs still support the armv* features specified in their TUNE_FEATURES even if they also have more specific SoC tunings.
The next patch (arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES) makes sure that ${SOC_FAMILY} (if present) and ${MACHINE} have higher override priorities than aarch64, as should be.
Finally, the last patch (arm-tunes: Add armv8a to TUNE_FEATURES as appropriate) adds the "armv8a" feature to TUNE_FEATURES for the Cortex-A32, Cortex-A35, Cortex-A53 and Cortex-A72 to match all the other ARM tunings.
//Peter
The following changes since commit a397fd17e42d745e6a23dee86e82b887f3d25ccd:
layer.conf: Update to warrior release name series (2019-04-02 15:24:50 +0100)
are available in the git repository at:
git://push.yoctoproject.org/poky-contrib pkj/arm-tunings
Peter Kjellerstedt (6):
arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-* Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in
package arches"
Revert "arm-tunes: Remove -march option if mcpu is already added"
arm-tunes: Prefer the -mcpu option over -march arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES
arm-tunes: Add armv8a to TUNE_FEATURES as appropriate
meta/conf/machine/include/arm/arch-arm.inc | 6 +++++ meta/conf/machine/include/arm/arch-arm64.inc | 2 +- meta/conf/machine/include/arm/arch-armv4.inc | 2 +- meta/conf/machine/include/arm/arch-armv5-dsp.inc | 2 +- meta/conf/machine/include/arm/arch-armv5.inc | 2 +- meta/conf/machine/include/arm/arch-armv6.inc | 2 +- meta/conf/machine/include/arm/arch-armv7a.inc | 2 +- meta/conf/machine/include/arm/arch-armv7ve.inc | 2 +- meta/conf/machine/include/arm/arch-armv8a.inc | 12 +++++----- meta/conf/machine/include/tune-arm1136jf-s.inc | 6 ++--- meta/conf/machine/include/tune-arm920t.inc | 6 ++--- meta/conf/machine/include/tune-arm926ejs.inc | 6 ++--- meta/conf/machine/include/tune-arm9tdmi.inc | 6 ++--- meta/conf/machine/include/tune-cortexa15.inc | 29 ++++++++++------------- meta/conf/machine/include/tune-cortexa17.inc | 29 ++++++++++------------- meta/conf/machine/include/tune-cortexa32.inc | 11 ++++----- meta/conf/machine/include/tune-cortexa35.inc | 6 ++--- meta/conf/machine/include/tune-cortexa5.inc | 29 ++++++++++------------- meta/conf/machine/include/tune-cortexa53.inc | 10 ++++---- meta/conf/machine/include/tune-cortexa7.inc | 29 ++++++++++------------- meta/conf/machine/include/tune-cortexa72.inc | 6 ++--- meta/conf/machine/include/tune-cortexa8.inc | 21 +++++++---------- meta/conf/machine/include/tune-cortexa9.inc | 30 ++++++++++-------------- meta/conf/machine/include/tune-ep9312.inc | 3 +-- meta/conf/machine/include/tune-iwmmxt.inc | 3 +-- meta/conf/machine/include/tune-strongarm1100.inc | 5 ++-- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 9 +++---- 28 files changed, 125 insertions(+), 153 deletions(-)
Signature · 1 line
2.12.0
PATCH 1/6 arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-*
The armv8a tune specific PACKAGE_EXTRA_ARCHS contained tune feature names like "crc" and "crypto" rather than package architecture names like "armv8a-crc" and "armv8a-crypto".
--- meta/conf/machine/include/arm/arch-armv8a.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
meta/conf/machine/include/arm/arch-armv8a.inc +3 -3
@@ -21,9 +21,9 @@ TUNE_FEATURES_tune-armv8a-crc = "${TUNE_FEATURES_tune-armv8a} crc" TUNE_FEATURES_tune-armv8a-crypto = "${TUNE_FEATURES_tune-armv8a} crypto" TUNE_FEATURES_tune-armv8a-crc-crypto = "${TUNE_FEATURES_tune-armv8a-crc} crypto" PACKAGE_EXTRA_ARCHS_tune-armv8a = "aarch64 armv8a" -PACKAGE_EXTRA_ARCHS_tune-armv8a-crc = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} crc" -PACKAGE_EXTRA_ARCHS_tune-armv8a-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} crypto" -PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} crypto" +PACKAGE_EXTRA_ARCHS_tune-armv8a-crc = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crc" +PACKAGE_EXTRA_ARCHS_tune-armv8a-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a} armv8a-crypto" +PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} armv8a-crypto armv8a-crc-crypto" BASE_LIB_tune-armv8a = "lib64" BASE_LIB_tune-armv8a-crc = "lib64" BASE_LIB_tune-armv8a-crypto = "lib64"
Signature · 1 line
2.12.0
PATCH 2/6 Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches"
In reply to Peter KjellerstedtThis reverts commit 1d6d5bb30a83f9136b7c33e297d48564ae61b50e.
--- meta/conf/machine/include/arm/arch-armv5-dsp.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/machine/include/arm/arch-armv5-dsp.inc +1 -1
@@ -1,4 +1,4 @@ -ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ], 'e', '', d)}" +ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'armv5', 'dsp' ], 'e', '', d)}" TUNEVALID[dsp] = "ARM DSP functionality" require conf/machine/include/arm/arch-armv5.inc
Signature · 1 line
2.12.0
Re: [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches"
Peter
Quoted 1 line · Peter Kjellerstedt
This reverts commit
1d6d5bb30a83f9136b7c33e297d48564ae61b50e.
What problem are you seeing that is being fixed by this revert? it may help decide if it need to be in warrior.
- armin
Quoted 16 lines
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/conf/machine/include/arm/arch-armv5-dsp.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/conf/machine/include/arm/arch-armv5-dsp.inc +1
-1@@ -1,4 +1,4 @@ -ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ], 'e', '', d)}" +ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'armv5', 'dsp' ], 'e', '', d)}" TUNEVALID[dsp] = "ARM DSP functionality" require conf/machine/include/arm/arch-armv5.inc
Re: [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches"
This revert (and the following) are there to allow my alternative solution to be applied.
//Peter
Quoted 36 lines
-----Original Message-----
From: akuster808 <[email protected]>
Sent: den 2 april 2019 22:53
To: Peter Kjellerstedt <[email protected]>; openembedded- [email protected]
Subject: Re: [OE-core] [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches"Peter
Quoted 1 line · Peter Kjellerstedt
This reverts commit
1d6d5bb30a83f9136b7c33e297d48564ae61b50e.What problem are you seeing that is being fixed by this revert? it may help decide if it need to be in warrior.
- armin
Review
Quoted 7 lines
Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/conf/machine/include/arm/arch-armv5-dsp.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
meta/conf/machine/include/arm/arch-armv5-dsp.inc line 1
Quoted 5 lines
index
d117af1520..1f16085fcd100644meta/conf/machine/include/arm/arch-armv5-dsp.inc +0
-1@@ -1,4 +1,4 @@ -ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'dsp' ],'e', '', d)}"
meta/conf/machine/include/arm/arch-armv5-dsp.inc line 1
Quoted 1 line
meta/conf/machine/include/arm/arch-armv5-dsp.inc +1
-0+ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'armv5','dsp' ], 'e', '', d)}"
Quoted 3 lines
meta/conf/machine/include/arm/arch-armv5-dsp.inc +0
-0TUNEVALID[dsp] = "ARM DSP functionality" require conf/machine/include/arm/arch-armv5.inc
PATCH 3/6 Revert "arm-tunes: Remove -march option if mcpu is already added"
In reply to Peter KjellerstedtThis reverts commit ac83d22eb5031f7fdd09d34a1a46d92fd3e39a3c.
This solution had unforeseen side effects, which, e.g., lead to the following sanity error if trying to build with the arm926ejs default tune:
Error, the PACKAGE_ARCHS variable (all any noarch arm armv4 armv4t armv5 armv5t armv5e armv5te arm926ejste arm926ejse <BSP name withheld>) for DEFAULTTUNE (arm926ejs) does not contain TUNE_PKGARCH (arm926ejst).
An alternative solution will follow, which only affects the -mcpu and -march options without other side effects.
--- meta/conf/machine/include/tune-arm1136jf-s.inc | 4 +--- meta/conf/machine/include/tune-arm920t.inc | 4 +--- meta/conf/machine/include/tune-arm926ejs.inc | 4 +--- meta/conf/machine/include/tune-arm9tdmi.inc | 4 +--- meta/conf/machine/include/tune-cortexa15.inc | 27 ++++++++++------------- meta/conf/machine/include/tune-cortexa17.inc | 27 ++++++++++------------- meta/conf/machine/include/tune-cortexa5.inc | 27 ++++++++++------------- meta/conf/machine/include/tune-cortexa7.inc | 27 ++++++++++------------- meta/conf/machine/include/tune-cortexa8.inc | 19 +++++++--------- meta/conf/machine/include/tune-cortexa9.inc | 28 ++++++++++-------------- meta/conf/machine/include/tune-ep9312.inc | 1 - meta/conf/machine/include/tune-iwmmxt.inc | 3 +-- meta/conf/machine/include/tune-strongarm1100.inc | 3 +-- meta/conf/machine/include/tune-xscale.inc | 7 ++---- 14 files changed, 76 insertions(+), 109 deletions(-)
meta/conf/machine/include/tune-arm1136jf-s.inc +1 -3
@@ -4,10 +4,8 @@ require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', 'armv6:', '' ,d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs" -# mcpu is used so don't use armv6 as we don't want march -TUNE_FEATURES_tune-arm1136jfs = "arm arm1136jfs" +TUNE_FEATURES_tune-arm1136jfs = "${TUNE_FEATURES_tune-armv6} arm1136jfs" PACKAGE_EXTRA_ARCHS_tune-arm1136jfs = "${PACKAGE_EXTRA_ARCHS_tune-armv6} arm1136jfs-vfp"
meta/conf/machine/include/tune-arm920t.inc +1 -3
@@ -4,10 +4,8 @@ require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', 'armv4:', '' ,d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t" -# mcpu is used so don't use armv4t as we don't want march -TUNE_FEATURES_tune-arm920t = "arm thumb arm920t" +TUNE_FEATURES_tune-arm920t = "${TUNE_FEATURES_tune-armv4t} arm920t" PACKAGE_EXTRA_ARCHS_tune-arm920t = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} arm920t arm920tt"
meta/conf/machine/include/tune-arm926ejs.inc +1 -3
@@ -4,10 +4,8 @@ require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', 'armv5:', '' ,d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs" -# mcpu is used so don't use armv5te as we don't want march -TUNE_FEATURES_tune-arm926ejs = "arm thumb dsp arm926ejs" +TUNE_FEATURES_tune-arm926ejs = "${TUNE_FEATURES_tune-armv5te} arm926ejs" PACKAGE_EXTRA_ARCHS_tune-arm926ejs = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} arm926ejste arm926ejse"
meta/conf/machine/include/tune-arm9tdmi.inc +1 -3
@@ -4,10 +4,8 @@ require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', 'armv4:', '' ,d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi" -# mcpu is used so don't use armv4t as we don't want march -TUNE_FEATURES_tune-arm9tdmi = "arm thumb arm9tdmi" +TUNE_FEATURES_tune-arm9tdmi = "${TUNE_FEATURES_tune-armv4t} arm9tdmi" PACKAGE_EXTRA_ARCHS_tune-arm9tdmi = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} arm9tdmit"
meta/conf/machine/include/tune-cortexa15.inc +12 -15
@@ -4,7 +4,6 @@ require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', 'armv7ve:', '' ,d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"
@@ -14,13 +13,12 @@ ARMPKGARCH_tune-cortexa15-neon = "cortexa15" ARMPKGARCH_tune-cortexa15t-neon = "cortexa15" ARMPKGARCH_tune-cortexa15-neon-vfpv4 = "cortexa15" ARMPKGARCH_tune-cortexa15t-neon-vfpv4 = "cortexa15" -# mcpu is used so don't use armv7ve as we don't want march -TUNE_FEATURES_tune-cortexa15 = "arm vfp cortexa15" -TUNE_FEATURES_tune-cortexa15t = "${TUNE_FEATURES_tune-cortexa15} thumb" -TUNE_FEATURES_tune-cortexa15-neon = "${TUNE_FEATURES_tune-cortexa15} neon" -TUNE_FEATURES_tune-cortexa15t-neon = "${TUNE_FEATURES_tune-cortexa15-neon} thumb" -TUNE_FEATURES_tune-cortexa15-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15-neon} vfpv4" -TUNE_FEATURES_tune-cortexa15t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15-neon-vfpv4} thumb" +TUNE_FEATURES_tune-cortexa15 = "${TUNE_FEATURES_tune-armv7ve} cortexa15" +TUNE_FEATURES_tune-cortexa15t = "${TUNE_FEATURES_tune-armv7vet} cortexa15" +TUNE_FEATURES_tune-cortexa15-neon = "${TUNE_FEATURES_tune-armv7ve-neon} cortexa15" +TUNE_FEATURES_tune-cortexa15t-neon = "${TUNE_FEATURES_tune-armv7vet-neon} cortexa15" +TUNE_FEATURES_tune-cortexa15-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} cortexa15" +TUNE_FEATURES_tune-cortexa15t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa15" PACKAGE_EXTRA_ARCHS_tune-cortexa15 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa15-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa15t = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa15-vfp cortexa15t2-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa15-vfp cortexa15-neon"
@@ -36,13 +34,12 @@ ARMPKGARCH_tune-cortexa15hf-neon = "cortexa15" ARMPKGARCH_tune-cortexa15thf-neon = "cortexa15" ARMPKGARCH_tune-cortexa15hf-neon-vfpv4 = "cortexa15" ARMPKGARCH_tune-cortexa15thf-neon-vfpv4 = "cortexa15" -# mcpu is used so don't use armv7ve as we don't want march -TUNE_FEATURES_tune-cortexa15hf = "${TUNE_FEATURES_tune-cortexa15} callconvention-hard" -TUNE_FEATURES_tune-cortexa15thf = "${TUNE_FEATURES_tune-cortexa15t} callconvention-hard" -TUNE_FEATURES_tune-cortexa15hf-neon = "${TUNE_FEATURES_tune-cortexa15-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa15thf-neon = "${TUNE_FEATURES_tune-cortexa15t-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa15hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15-neon-vfpv4} callconvention-hard" -TUNE_FEATURES_tune-cortexa15thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa15t-neon-vfpv4} callconvention-hard" +TUNE_FEATURES_tune-cortexa15hf = "${TUNE_FEATURES_tune-armv7vehf} cortexa15" +TUNE_FEATURES_tune-cortexa15thf = "${TUNE_FEATURES_tune-armv7vethf} cortexa15" +TUNE_FEATURES_tune-cortexa15hf-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} cortexa15" +TUNE_FEATURES_tune-cortexa15thf-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} cortexa15" +TUNE_FEATURES_tune-cortexa15hf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} cortexa15" +TUNE_FEATURES_tune-cortexa15thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa15" PACKAGE_EXTRA_ARCHS_tune-cortexa15hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa15hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa15thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa15hf-vfp cortexa15t2hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa15hf-vfp cortexa15hf-neon"
meta/conf/machine/include/tune-cortexa17.inc +12 -15
@@ -4,7 +4,6 @@ require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', 'armv7ve:', '' ,d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"
@@ -14,13 +13,12 @@ ARMPKGARCH_tune-cortexa17-neon = "cortexa17" ARMPKGARCH_tune-cortexa17t-neon = "cortexa17" ARMPKGARCH_tune-cortexa17-neon-vfpv4 = "cortexa17" ARMPKGARCH_tune-cortexa17t-neon-vfpv4 = "cortexa17" -# mcpu is used so don't use armv7ve as we don't want march -TUNE_FEATURES_tune-cortexa17 = "arm vfp cortexa17" -TUNE_FEATURES_tune-cortexa17t = "${TUNE_FEATURES_tune-cortexa17} thumb" -TUNE_FEATURES_tune-cortexa17-neon = "${TUNE_FEATURES_tune-cortexa17} neon" -TUNE_FEATURES_tune-cortexa17t-neon = "${TUNE_FEATURES_tune-cortexa17-neon} thumb" -TUNE_FEATURES_tune-cortexa17-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17-neon} vfpv4" -TUNE_FEATURES_tune-cortexa17t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17-neon-vfpv4} thumb" +TUNE_FEATURES_tune-cortexa17 = "${TUNE_FEATURES_tune-armv7ve} cortexa17" +TUNE_FEATURES_tune-cortexa17t = "${TUNE_FEATURES_tune-armv7vet} cortexa17" +TUNE_FEATURES_tune-cortexa17-neon = "${TUNE_FEATURES_tune-armv7ve-neon} cortexa17" +TUNE_FEATURES_tune-cortexa17t-neon = "${TUNE_FEATURES_tune-armv7vet-neon} cortexa17" +TUNE_FEATURES_tune-cortexa17-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} cortexa17" +TUNE_FEATURES_tune-cortexa17t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa17" PACKAGE_EXTRA_ARCHS_tune-cortexa17 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa17-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa17t = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa17-vfp cortexa17t2-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa17-vfp cortexa17-neon"
@@ -36,13 +34,12 @@ ARMPKGARCH_tune-cortexa17hf-neon = "cortexa17" ARMPKGARCH_tune-cortexa17thf-neon = "cortexa17" ARMPKGARCH_tune-cortexa17hf-neon-vfpv4 = "cortexa17" ARMPKGARCH_tune-cortexa17thf-neon-vfpv4 = "cortexa17" -# mcpu is used so don't use armv7ve as we don't want march -TUNE_FEATURES_tune-cortexa17hf = "${TUNE_FEATURES_tune-cortexa17} callconvention-hard" -TUNE_FEATURES_tune-cortexa17thf = "${TUNE_FEATURES_tune-cortexa17t} callconvention-hard" -TUNE_FEATURES_tune-cortexa17hf-neon = "${TUNE_FEATURES_tune-cortexa17-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa17thf-neon = "${TUNE_FEATURES_tune-cortexa17t-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa17hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17-neon-vfpv4} callconvention-hard" -TUNE_FEATURES_tune-cortexa17thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa17t-neon-vfpv4} callconvention-hard" +TUNE_FEATURES_tune-cortexa17hf = "${TUNE_FEATURES_tune-armv7vehf} cortexa17" +TUNE_FEATURES_tune-cortexa17thf = "${TUNE_FEATURES_tune-armv7vethf} cortexa17" +TUNE_FEATURES_tune-cortexa17hf-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} cortexa17" +TUNE_FEATURES_tune-cortexa17thf-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} cortexa17" +TUNE_FEATURES_tune-cortexa17hf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} cortexa17" +TUNE_FEATURES_tune-cortexa17thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa17" PACKAGE_EXTRA_ARCHS_tune-cortexa17hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa17hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa17thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa17hf-vfp cortexa17t2hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa17hf-vfp cortexa17hf-neon"
meta/conf/machine/include/tune-cortexa5.inc +12 -15
@@ -4,7 +4,6 @@ require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', 'armv7a:', '' ,d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon cortexa5-neon-vfpv4 cortexa5t-neon-vfpv4"
@@ -14,13 +13,12 @@ ARMPKGARCH_tune-cortexa5-neon = "cortexa5" ARMPKGARCH_tune-cortexa5t-neon = "cortexa5" ARMPKGARCH_tune-cortexa5-neon-vfpv4 = "cortexa5" ARMPKGARCH_tune-cortexa5t-neon-vfpv4 = "cortexa5" -# mcpu is used so don't use armv7a as we don't want march -TUNE_FEATURES_tune-cortexa5 = "arm vfp cortexa5" -TUNE_FEATURES_tune-cortexa5t = "${TUNE_FEATURES_tune-cortexa5} thumb" -TUNE_FEATURES_tune-cortexa5-neon = "${TUNE_FEATURES_tune-cortexa5} neon" -TUNE_FEATURES_tune-cortexa5t-neon = "${TUNE_FEATURES_tune-cortexa5-neon} thumb" -TUNE_FEATURES_tune-cortexa5-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5-neon} vfpv4" -TUNE_FEATURES_tune-cortexa5t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5-neon-vfpv4} thumb" +TUNE_FEATURES_tune-cortexa5 = "${TUNE_FEATURES_tune-armv7a} cortexa5" +TUNE_FEATURES_tune-cortexa5t = "${TUNE_FEATURES_tune-armv7at} cortexa5" +TUNE_FEATURES_tune-cortexa5-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa5" +TUNE_FEATURES_tune-cortexa5t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa5" +TUNE_FEATURES_tune-cortexa5-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7a-neon-vfpv4} cortexa5" +TUNE_FEATURES_tune-cortexa5t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon-vfpv4} cortexa5" PACKAGE_EXTRA_ARCHS_tune-cortexa5 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa5-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa5t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa5-vfp cortexa5t2-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa5-vfp cortexa5-neon"
@@ -36,13 +34,12 @@ ARMPKGARCH_tune-cortexa5hf-neon = "cortexa5" ARMPKGARCH_tune-cortexa5thf-neon = "cortexa5" ARMPKGARCH_tune-cortexa5hf-neon-vfpv4 = "cortexa5" ARMPKGARCH_tune-cortexa5thf-neon-vfpv4 = "cortexa5" -# mcpu is used so don't use armv7a as we don't want march -TUNE_FEATURES_tune-cortexa5hf = "${TUNE_FEATURES_tune-cortexa5} callconvention-hard" -TUNE_FEATURES_tune-cortexa5thf = "${TUNE_FEATURES_tune-cortexa5t} callconvention-hard" -TUNE_FEATURES_tune-cortexa5hf-neon = "${TUNE_FEATURES_tune-cortexa5-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa5thf-neon = "${TUNE_FEATURES_tune-cortexa5t-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa5hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5-neon-vfpv4} callconvention-hard" -TUNE_FEATURES_tune-cortexa5thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa5t-neon-vfpv4} callconvention-hard" +TUNE_FEATURES_tune-cortexa5hf = "${TUNE_FEATURES_tune-armv7ahf} cortexa5" +TUNE_FEATURES_tune-cortexa5thf = "${TUNE_FEATURES_tune-armv7athf} cortexa5" +TUNE_FEATURES_tune-cortexa5hf-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa5" +TUNE_FEATURES_tune-cortexa5thf-neon = "${TUNE_FEATURES_tune-armv7athf-neon} cortexa5" +TUNE_FEATURES_tune-cortexa5hf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ahf-neon-vfpv4} cortexa5" +TUNE_FEATURES_tune-cortexa5thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7athf-neon-vfpv4} cortexa5" PACKAGE_EXTRA_ARCHS_tune-cortexa5hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa5hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa5thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa5hf-vfp cortexa5t2hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa5hf-vfp cortexa5hf-neon"
meta/conf/machine/include/tune-cortexa7.inc +12 -15
@@ -4,7 +4,6 @@ require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', 'armv7ve:', '' ,d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"
@@ -14,13 +13,12 @@ ARMPKGARCH_tune-cortexa7-neon = "cortexa7" ARMPKGARCH_tune-cortexa7t-neon = "cortexa7" ARMPKGARCH_tune-cortexa7-neon-vfpv4 = "cortexa7" ARMPKGARCH_tune-cortexa7t-neon-vfpv4 = "cortexa7" -# mcpu is used so don't use armv7ve as we don't want march -TUNE_FEATURES_tune-cortexa7 = "arm vfp cortexa7" -TUNE_FEATURES_tune-cortexa7t = "${TUNE_FEATURES_tune-cortexa7} thumb" -TUNE_FEATURES_tune-cortexa7-neon = "${TUNE_FEATURES_tune-cortexa7} neon" -TUNE_FEATURES_tune-cortexa7t-neon = "${TUNE_FEATURES_tune-cortexa7-neon} thumb" -TUNE_FEATURES_tune-cortexa7-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7-neon} vfpv4" -TUNE_FEATURES_tune-cortexa7t-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7-neon-vfpv4} thumb" +TUNE_FEATURES_tune-cortexa7 = "${TUNE_FEATURES_tune-armv7ve} cortexa7" +TUNE_FEATURES_tune-cortexa7t = "${TUNE_FEATURES_tune-armv7vet} cortexa7" +TUNE_FEATURES_tune-cortexa7-neon = "${TUNE_FEATURES_tune-armv7ve-neon} cortexa7" +TUNE_FEATURES_tune-cortexa7t-neon = "${TUNE_FEATURES_tune-armv7vet-neon} cortexa7" +TUNE_FEATURES_tune-cortexa7-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4} cortexa7" +TUNE_FEATURES_tune-cortexa7t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa7" PACKAGE_EXTRA_ARCHS_tune-cortexa7 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve} cortexa7-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa7t = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa7-vfp cortexa7t2-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon} cortexa7-vfp cortexa7-neon"
@@ -36,13 +34,12 @@ ARMPKGARCH_tune-cortexa7hf-neon = "cortexa7" ARMPKGARCH_tune-cortexa7thf-neon = "cortexa7" ARMPKGARCH_tune-cortexa7hf-neon-vfpv4 = "cortexa7" ARMPKGARCH_tune-cortexa7thf-neon-vfpv4 = "cortexa7" -# mcpu is used so don't use armv7ve as we don't want march -TUNE_FEATURES_tune-cortexa7hf = "${TUNE_FEATURES_tune-cortexa7} callconvention-hard" -TUNE_FEATURES_tune-cortexa7thf = "${TUNE_FEATURES_tune-cortexa7t} callconvention-hard" -TUNE_FEATURES_tune-cortexa7hf-neon = "${TUNE_FEATURES_tune-cortexa7-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa7thf-neon = "${TUNE_FEATURES_tune-cortexa7t-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa7hf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7-neon-vfpv4} callconvention-hard" -TUNE_FEATURES_tune-cortexa7thf-neon-vfpv4 = "${TUNE_FEATURES_tune-cortexa7t-neon-vfpv4} callconvention-hard" +TUNE_FEATURES_tune-cortexa7hf = "${TUNE_FEATURES_tune-armv7vehf} cortexa7" +TUNE_FEATURES_tune-cortexa7thf = "${TUNE_FEATURES_tune-armv7vethf} cortexa7" +TUNE_FEATURES_tune-cortexa7hf-neon = "${TUNE_FEATURES_tune-armv7vehf-neon} cortexa7" +TUNE_FEATURES_tune-cortexa7thf-neon = "${TUNE_FEATURES_tune-armv7vethf-neon} cortexa7" +TUNE_FEATURES_tune-cortexa7hf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4} cortexa7" +TUNE_FEATURES_tune-cortexa7thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa7" PACKAGE_EXTRA_ARCHS_tune-cortexa7hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf} cortexa7hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa7thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa7hf-vfp cortexa7t2hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon} cortexa7hf-vfp cortexa7hf-neon"
meta/conf/machine/include/tune-cortexa8.inc +8 -11
@@ -4,7 +4,6 @@ require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', 'armv7a:', '' ,d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"
@@ -12,11 +11,10 @@ ARMPKGARCH_tune-cortexa8 = "cortexa8" ARMPKGARCH_tune-cortexa8t = "cortexa8" ARMPKGARCH_tune-cortexa8-neon = "cortexa8" ARMPKGARCH_tune-cortexa8t-neon = "cortexa8" -# mcpu is used so don't use armv7a as we don't want march -TUNE_FEATURES_tune-cortexa8 = "arm vfp cortexa8" -TUNE_FEATURES_tune-cortexa8t = "${TUNE_FEATURES_tune-cortexa8} thumb" -TUNE_FEATURES_tune-cortexa8-neon = "${TUNE_FEATURES_tune-cortexa8} neon" -TUNE_FEATURES_tune-cortexa8t-neon = "${TUNE_FEATURES_tune-cortexa8-neon} thumb" +TUNE_FEATURES_tune-cortexa8 = "${TUNE_FEATURES_tune-armv7a} cortexa8" +TUNE_FEATURES_tune-cortexa8t = "${TUNE_FEATURES_tune-armv7at} cortexa8" +TUNE_FEATURES_tune-cortexa8-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa8" +TUNE_FEATURES_tune-cortexa8t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa8" PACKAGE_EXTRA_ARCHS_tune-cortexa8 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa8-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa8t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa8-vfp cortexa8t2-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa8-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa8-vfp cortexa8-neon"
@@ -28,11 +26,10 @@ ARMPKGARCH_tune-cortexa8hf = "cortexa8" ARMPKGARCH_tune-cortexa8thf = "cortexa8" ARMPKGARCH_tune-cortexa8hf-neon = "cortexa8" ARMPKGARCH_tune-cortexa8thf-neon = "cortexa8" -# mcpu is used so don't use armv7a as we don't want march -TUNE_FEATURES_tune-cortexa8hf = "${TUNE_FEATURES_tune-cortexa8} callconvention-hard" -TUNE_FEATURES_tune-cortexa8thf = "${TUNE_FEATURES_tune-cortexa8t} callconvention-hard" -TUNE_FEATURES_tune-cortexa8hf-neon = "${TUNE_FEATURES_tune-cortexa8-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa8thf-neon = "${TUNE_FEATURES_tune-cortexa8t-neon} callconvention-hard" +TUNE_FEATURES_tune-cortexa8hf = "${TUNE_FEATURES_tune-armv7ahf} cortexa8" +TUNE_FEATURES_tune-cortexa8thf = "${TUNE_FEATURES_tune-armv7athf} cortexa8" +TUNE_FEATURES_tune-cortexa8hf-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa8" +TUNE_FEATURES_tune-cortexa8thf-neon = "${TUNE_FEATURES_tune-armv7athf-neon} cortexa8" PACKAGE_EXTRA_ARCHS_tune-cortexa8hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa8hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa8thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa8hf-vfp cortexa8t2hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa8hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa8hf-vfp cortexa8hf-neon"
meta/conf/machine/include/tune-cortexa9.inc +12 -16
@@ -4,7 +4,6 @@ require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', 'armv7a:', '' ,d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"
@@ -12,11 +11,10 @@ ARMPKGARCH_tune-cortexa9 = "cortexa9" ARMPKGARCH_tune-cortexa9t = "cortexa9" ARMPKGARCH_tune-cortexa9-neon = "cortexa9" ARMPKGARCH_tune-cortexa9t-neon = "cortexa9" -# mcpu is used so don't use armv7a as we don't want march -TUNE_FEATURES_tune-cortexa9 = "arm vfp cortexa9" -TUNE_FEATURES_tune-cortexa9t = "${TUNE_FEATURES_tune-cortexa9} thumb" -TUNE_FEATURES_tune-cortexa9-neon = "${TUNE_FEATURES_tune-cortexa9} neon" -TUNE_FEATURES_tune-cortexa9t-neon = "${TUNE_FEATURES_tune-cortexa9-neon} thumb" +TUNE_FEATURES_tune-cortexa9 = "${TUNE_FEATURES_tune-armv7a} cortexa9" +TUNE_FEATURES_tune-cortexa9t = "${TUNE_FEATURES_tune-armv7at} cortexa9" +TUNE_FEATURES_tune-cortexa9-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa9" +TUNE_FEATURES_tune-cortexa9t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa9" PACKAGE_EXTRA_ARCHS_tune-cortexa9 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa9-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa9t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa9-vfp cortexa9t2-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa9-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa9-vfp cortexa9-neon"
@@ -28,11 +26,10 @@ ARMPKGARCH_tune-cortexa9hf = "cortexa9" ARMPKGARCH_tune-cortexa9thf = "cortexa9" ARMPKGARCH_tune-cortexa9hf-neon = "cortexa9" ARMPKGARCH_tune-cortexa9thf-neon = "cortexa9" -# mcpu is used so don't use armv7a as we don't want march -TUNE_FEATURES_tune-cortexa9hf = "${TUNE_FEATURES_tune-cortexa9} callconvention-hard" -TUNE_FEATURES_tune-cortexa9thf = "${TUNE_FEATURES_tune-cortexa9t} callconvention-hard" -TUNE_FEATURES_tune-cortexa9hf-neon = "${TUNE_FEATURES_tune-cortexa9-neon} callconvention-hard" -TUNE_FEATURES_tune-cortexa9thf-neon = "${TUNE_FEATURES_tune-cortexa9t-neon} callconvention-hard" +TUNE_FEATURES_tune-cortexa9hf = "${TUNE_FEATURES_tune-armv7ahf} cortexa9" +TUNE_FEATURES_tune-cortexa9thf = "${TUNE_FEATURES_tune-armv7athf} cortexa9" +TUNE_FEATURES_tune-cortexa9hf-neon = "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa9" +TUNE_FEATURES_tune-cortexa9thf-neon = "${TUNE_FEATURES_tune-armv7athf-neon} cortexa9" PACKAGE_EXTRA_ARCHS_tune-cortexa9hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa9hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa9thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa9hf-vfp cortexa9t2hf-vfp" PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa9hf-vfp cortexa9hf-neon"
@@ -44,11 +41,10 @@ ARMPKGARCH_tune-cortexa9-vfpv3 = "cortexa9" ARMPKGARCH_tune-cortexa9t-vfpv3 = "cortexa9" ARMPKGARCH_tune-cortexa9hf-vfpv3 = "cortexa9" ARMPKGARCH_tune-cortexa9thf-vfpv3 = "cortexa9" -# mcpu is used so don't use armv7a as we don't want march -TUNE_FEATURES_tune-cortexa9-vfpv3 = "${TUNE_FEATURES_tune-cortexa9} vfpv3" -TUNE_FEATURES_tune-cortexa9t-vfpv3 = "${TUNE_FEATURES_tune-cortexa9t} vfpv3" -TUNE_FEATURES_tune-cortexa9hf-vfpv3 = "${TUNE_FEATURES_tune-cortexa9hf} vfpv3" -TUNE_FEATURES_tune-cortexa9thf-vfpv3 = "${TUNE_FEATURES_tune-cortexa9thf} vfpv3" +TUNE_FEATURES_tune-cortexa9-vfpv3 = "${TUNE_FEATURES_tune-armv7a-vfpv3} cortexa9" +TUNE_FEATURES_tune-cortexa9t-vfpv3 = "${TUNE_FEATURES_tune-armv7at-vfpv3} cortexa9" +TUNE_FEATURES_tune-cortexa9hf-vfpv3 = "${TUNE_FEATURES_tune-armv7ahf-vfpv3} cortexa9" +TUNE_FEATURES_tune-cortexa9thf-vfpv3 = "${TUNE_FEATURES_tune-armv7athf-vfpv3} cortexa9" PACKAGE_EXTRA_ARCHS_tune-cortexa9-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3} cortexa9-vfp cortexa9-vfpv3" PACKAGE_EXTRA_ARCHS_tune-cortexa9t-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3} cortexa9-vfp cortexa9-vfpv3 cortexa9t2-vfp cortexa9t2-vfpv3" PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3} cortexa9hf-vfp cortexa9hf-vfpv3"
meta/conf/machine/include/tune-ep9312.inc +0 -1
@@ -4,7 +4,6 @@ require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', 'armv4:', '' ,d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"
meta/conf/machine/include/tune-iwmmxt.inc +1 -2
@@ -6,8 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -mcpu=iwmmxt', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', 'armv5:', '' ,d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"
meta/conf/machine/include/tune-strongarm1100.inc +1 -2
@@ -4,9 +4,8 @@ require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', 'armv4:', '' ,d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm" -TUNE_FEATURES_tune-strongarm = "arm strongarm" +TUNE_FEATURES_tune-strongarm = "${TUNE_FEATURES_tune-armv4} strongarm" PACKAGE_EXTRA_ARCHS_tune-strongarm = "${PACKAGE_EXTRA_ARCHS_tune-armv4} strongarm"
meta/conf/machine/include/tune-xscale.inc +2 -5
@@ -4,16 +4,13 @@ require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" -MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'xscale', 'armv5:', '' ,d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale" -# mcpu is used so don't use armv5te as we don't want march -TUNE_FEATURES_tune-xscale = "arm thumb dsp xscale" +TUNE_FEATURES_tune-xscale = "${TUNE_FEATURES_tune-armv5te} xscale" PACKAGE_EXTRA_ARCHS_tune-xscale = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} xscale xscalet xscalee xscalete" AVAILTUNES += "xscale-be" ARMPKGARCH_tune-xscale-be = "xscale" -# mcpu is used so don't use armv5te as we don't want march -TUNE_FEATURES_tune-xscale-be = "${TUNE_FEATURES_tune-xscale} bigendian" +TUNE_FEATURES_tune-xscale-be = "${TUNE_FEATURES_tune-armv5teb} xscale bigendian" PACKAGE_EXTRA_ARCHS_tune-xscale-be = "${PACKAGE_EXTRA_ARCHS_tune-armv5teb} xscaleb xscaletb xscaleeb xscaleteb"
Signature · 1 line
2.12.0
PATCH 4/6 arm-tunes: Prefer the -mcpu option over -march
In reply to Peter KjellerstedtTune files that inherit the arch definitions already define appropriate -mcpu options, which are equivalent of the correct -march and -mtune combinations. This is preferred since gcc is getting stricter and stricter with option check semantics and can now find incompatible -march and -mcpu options better with every release. It does an internal feature consistency check and if it finds any discrepancies between what -mcpu would expand to as compared to -march, it will flag the options to be incompatible. For the naked eye it looks wrong, but gcc will translate -mcpu to a given -march internally and it might not match what we set in these arch files.
The effects are quite subtle, where this can result in configure tests failing to compile due to these incompatible options and a feature option getting disabled for a recipe for no reason.
E.g., with GCC 9, which can now detect that -mcpu=cortex-a5 and -march=armv7-a are incompatible, many features in libstdc++ end up disabled due to configure check failures, e.g., size_t size, ptrdiff_t sizes, which in turn results in compiling libstdc++ with wanted features disabled.
This is an alternative solution to the same problem originally implemented by Khem Raj in commit ac83d22e, but this time only affecting -mcpu and -march options without other side effects.
--- meta/conf/machine/include/arm/arch-arm.inc | 6 ++++++ meta/conf/machine/include/arm/arch-armv4.inc | 2 +- meta/conf/machine/include/arm/arch-armv5.inc | 2 +- meta/conf/machine/include/arm/arch-armv6.inc | 2 +- meta/conf/machine/include/arm/arch-armv7a.inc | 2 +- meta/conf/machine/include/arm/arch-armv7ve.inc | 2 +- meta/conf/machine/include/arm/arch-armv8a.inc | 6 +++--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa32.inc | 2 +- meta/conf/machine/include/tune-cortexa35.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa53.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa72.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 26 files changed, 33 insertions(+), 27 deletions(-)
meta/conf/machine/include/arm/arch-arm.inc +6 -0
@@ -11,6 +11,12 @@ ARMPKGSFX_THUMB ??= "" TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'armeb', 'arm', d)}" TUNE_PKGARCH = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}" +# Prefer -mcpu= over -arch= +TUNE_CCARGS_MCPU ??= "" +TUNE_CCARGS_MARCH ??= "" +TUNE_CCARGS_FEATURES ??= "" +TUNE_CCARGS .= "${@d.getVar('TUNE_CCARGS_MCPU') or d.getVar('TUNE_CCARGS_MARCH')}${TUNE_CCARGS_FEATURES}" + ABIEXTENSION = "eabi" TARGET_FPU = "${@d.getVar('TUNE_CCARGS_MFLOAT') or 'soft'}"
meta/conf/machine/include/arm/arch-armv4.inc +1 -1
@@ -2,7 +2,7 @@ DEFAULTTUNE ?= "armv4" TUNEVALID[arm] = "Enable ARM instruction set" TUNEVALID[armv4] = "Enable instructions for ARMv4" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4t', '', d)}" +TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4t', '', d)}" # enable --fix-v4bx when we have armv4 in TUNE_FEATURES, but then disable it when we have also armv5 or thumb # maybe we should extend bb.utils.contains to support check for any checkvalues in value, now it does # checkvalues.issubset(val) which cannot be used for negative test of foo neither bar in value
meta/conf/machine/include/arm/arch-armv5.inc +1 -1
@@ -2,7 +2,7 @@ DEFAULTTUNE ?= "armv5" TUNEVALID[armv5] = "Enable instructions for ARMv5" TUNECONFLICTS[armv5] = "armv4" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5t${ARMPKGSFX_DSP}', '', d)}" +TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5t${ARMPKGSFX_DSP}', '', d)}" MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv5', 'armv5:', '' ,d)}" require conf/machine/include/arm/arch-armv4.inc
meta/conf/machine/include/arm/arch-armv6.inc +1 -1
@@ -2,7 +2,7 @@ DEFAULTTUNE ?= "armv6hf" TUNEVALID[armv6] = "Enable instructions for ARMv6" TUNECONFLICTS[armv6] = "armv4 armv5" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', ' -march=armv6', '', d)}" +TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', ' -march=armv6', '', d)}" MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv6', 'armv6:', '' ,d)}" require conf/machine/include/arm/arch-armv5-dsp.inc
meta/conf/machine/include/arm/arch-armv7a.inc +1 -1
@@ -3,7 +3,7 @@ ARM_INSTRUCTION_SET ?= "thumb" TUNEVALID[armv7a] = "Enable instructions for ARMv7-a" TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', ' -march=armv7-a', '', d)}" +TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', ' -march=armv7-a', '', d)}" MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 'armv7a:', '' ,d)}" require conf/machine/include/arm/arch-armv6.inc
meta/conf/machine/include/arm/arch-armv7ve.inc +1 -1
@@ -2,7 +2,7 @@ DEFAULTTUNE ?= "armv7vethf" TUNEVALID[armv7ve] = "Enable instructions for ARMv7ve" TUNECONFLICTS[armv7ve] = "armv4 armv5 armv6 armv7 armv7a" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', ' -march=armv7ve', '', d)}" +TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', ' -march=armv7ve', '', d)}" MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', 'armv7ve:', '' ,d)}" require conf/machine/include/arm/arch-armv7a.inc
meta/conf/machine/include/arm/arch-armv8a.inc +3 -3
@@ -1,11 +1,11 @@ DEFAULTTUNE ?= "armv8a-crc" TUNEVALID[armv8a] = "Enable instructions for ARMv8-a" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8a', ' -march=armv8-a', '', d)}" +TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv8a', ' -march=armv8-a', '', d)}" TUNEVALID[crc] = "Enable instructions for ARMv8-a Cyclic Redundancy Check (CRC)" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'crc', '+crc', '', d)}" +TUNE_CCARGS_FEATURES .= "${@bb.utils.contains('TUNE_FEATURES', 'crc', '+crc', '', d)}" TUNEVALID[crypto] = "Enable instructions for ARMv8-a cryptographic" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '+crypto', '', d)}" +TUNE_CCARGS_FEATURES .= "${@bb.utils.contains('TUNE_FEATURES', 'crypto', '+crypto', '', d)}" MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv8a', 'armv8a:', '' ,d)}" require conf/machine/include/arm/arch-arm64.inc
meta/conf/machine/include/tune-arm1136jf-s.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"
meta/conf/machine/include/tune-arm920t.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"
meta/conf/machine/include/tune-arm926ejs.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"
meta/conf/machine/include/tune-arm9tdmi.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"
meta/conf/machine/include/tune-cortexa15.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"
meta/conf/machine/include/tune-cortexa17.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"
meta/conf/machine/include/tune-cortexa32.inc +1 -1
@@ -2,7 +2,7 @@ DEFAULTTUNE ?= "cortexa32" TUNEVALID[cortexa32] = "Enable Cortex-A32 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa32', ' -mcpu=cortex-a32', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa32', ' -mcpu=cortex-a32', '', d)}" require conf/machine/include/arm/arch-armv8a.inc
meta/conf/machine/include/tune-cortexa35.inc +1 -1
@@ -1,7 +1,7 @@ DEFAULTTUNE ?= "cortexa35" TUNEVALID[cortexa35] = "Enable Cortex-A35 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa35', ' -mcpu=cortex-a35', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa35', ' -mcpu=cortex-a35', '', d)}" require conf/machine/include/arm/arch-armv8a.inc
meta/conf/machine/include/tune-cortexa5.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon cortexa5-neon-vfpv4 cortexa5t-neon-vfpv4"
meta/conf/machine/include/tune-cortexa53.inc +1 -1
@@ -1,7 +1,7 @@ DEFAULTTUNE ?= "cortexa53" TUNEVALID[cortexa53] = "Enable Cortex-A53 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa53', ' -mcpu=cortex-a53', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa53', ' -mcpu=cortex-a53', '', d)}" require conf/machine/include/arm/arch-armv8a.inc
meta/conf/machine/include/tune-cortexa7.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"
meta/conf/machine/include/tune-cortexa72.inc +1 -1
@@ -1,7 +1,7 @@ DEFAULTTUNE ?= "cortexa72" TUNEVALID[cortexa72] = "Enable Cortex-A72 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa72', ' -mcpu=cortex-a72', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa72', ' -mcpu=cortex-a72', '', d)}" require conf/machine/include/arm/arch-armv8a.inc
meta/conf/machine/include/tune-cortexa8.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"
meta/conf/machine/include/tune-cortexa9.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"
meta/conf/machine/include/tune-ep9312.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"
meta/conf/machine/include/tune-iwmmxt.inc +1 -1
@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -mcpu=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"
meta/conf/machine/include/tune-strongarm1100.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"
meta/conf/machine/include/tune-thunderx.inc +1 -1
@@ -3,7 +3,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx', '',d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx', '',d)}" require conf/machine/include/arm/arch-armv8a.inc
meta/conf/machine/include/tune-xscale.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale"
Signature · 1 line
2.12.0
PATCH 5/6 arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES
In reply to Peter KjellerstedtThis makes sure, e.g., ${SOC_FAMILY} and ${MACHINE} have higher priorities than aarch64.
--- meta/conf/machine/include/arm/arch-arm64.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/machine/include/arm/arch-arm64.inc +1 -1
@@ -4,7 +4,7 @@ require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[aarch64] = "Enable instructions for aarch64" -MACHINEOVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', ':aarch64', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'aarch64:', '' ,d)}" # Little Endian base configs AVAILTUNES += "aarch64 aarch64_be"
Signature · 1 line
2.12.0
PATCH 6/6 arm-tunes: Add armv8a to TUNE_FEATURES as appropriate
In reply to Peter KjellerstedtThis adds the armv8a tuning for Cortex-A32, Cortex-A35, Cortex-A53 and Cortex-A72. This matches the other ARM tunes.
--- meta/conf/machine/include/tune-cortexa32.inc | 9 ++++----- meta/conf/machine/include/tune-cortexa35.inc | 4 ++-- meta/conf/machine/include/tune-cortexa53.inc | 8 ++++---- meta/conf/machine/include/tune-cortexa72.inc | 4 ++-- 4 files changed, 12 insertions(+), 13 deletions(-)
meta/conf/machine/include/tune-cortexa32.inc +4 -5
@@ -1,6 +1,5 @@ DEFAULTTUNE ?= "cortexa32" - TUNEVALID[cortexa32] = "Enable Cortex-A32 specific processor optimizations" TUNE_CCARGS_MCPU .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa32', ' -mcpu=cortex-a32', '', d)}"
@@ -8,10 +7,10 @@ require conf/machine/include/arm/arch-armv8a.inc # Little Endian base configs AVAILTUNES += "cortexa32 cortexa32-crypto" -ARMPKGARCH_tune-cortexa32 = "cortexa32" -ARMPKGARCH_tune-cortexa32-crypto = "cortexa32" -TUNE_FEATURES_tune-cortexa32 = "aarch64 cortexa32 crc" -TUNE_FEATURES_tune-cortexa32-crypto = "aarch64 cortexa32 crc crypto" +ARMPKGARCH_tune-cortexa32 ?= "cortexa32" +ARMPKGARCH_tune-cortexa32-crypto ?= "cortexa32" +TUNE_FEATURES_tune-cortexa32 = "${TUNE_FEATURES_tune-armv8a-crc} cortexa32" +TUNE_FEATURES_tune-cortexa32-crypto = "${TUNE_FEATURES_tune-armv8a-crc-crypto} cortexa32" PACKAGE_EXTRA_ARCHS_tune-cortexa32 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa32" PACKAGE_EXTRA_ARCHS_tune-cortexa32-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa32 cortexa32-crypto" BASE_LIB_tune-cortexa32 = "lib64"
meta/conf/machine/include/tune-cortexa35.inc +2 -2
@@ -9,8 +9,8 @@ require conf/machine/include/arm/arch-armv8a.inc AVAILTUNES += "cortexa35 cortexa35-crypto" ARMPKGARCH_tune-cortexa35 = "cortexa35" ARMPKGARCH_tune-cortexa35-crypto = "cortexa35" -TUNE_FEATURES_tune-cortexa35 = "aarch64 cortexa35 crc" -TUNE_FEATURES_tune-cortexa35-crypto = "aarch64 cortexa35 crc crypto" +TUNE_FEATURES_tune-cortexa35 = "${TUNE_FEATURES_tune-armv8a-crc} cortexa35" +TUNE_FEATURES_tune-cortexa35-crypto = "${TUNE_FEATURES_tune-armv8a-crc-crypto} cortexa35" PACKAGE_EXTRA_ARCHS_tune-cortexa35 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa35" PACKAGE_EXTRA_ARCHS_tune-cortexa35-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa35 cortexa35-crypto" BASE_LIB_tune-cortexa35 = "lib64"
meta/conf/machine/include/tune-cortexa53.inc +4 -4
@@ -7,10 +7,10 @@ require conf/machine/include/arm/arch-armv8a.inc # Little Endian base configs AVAILTUNES += "cortexa53 cortexa53-crypto" -ARMPKGARCH_tune-cortexa53 = "cortexa53" -ARMPKGARCH_tune-cortexa53-crypto = "cortexa53" -TUNE_FEATURES_tune-cortexa53 = "aarch64 cortexa53 crc" -TUNE_FEATURES_tune-cortexa53-crypto = "aarch64 cortexa53 crc crypto" +ARMPKGARCH_tune-cortexa53 ?= "cortexa53" +ARMPKGARCH_tune-cortexa53-crypto ?= "cortexa53" +TUNE_FEATURES_tune-cortexa53 = "${TUNE_FEATURES_tune-armv8a-crc} cortexa53" +TUNE_FEATURES_tune-cortexa53-crypto = "${TUNE_FEATURES_tune-armv8a-crc-crypto}cortexa53" PACKAGE_EXTRA_ARCHS_tune-cortexa53 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc} cortexa53" PACKAGE_EXTRA_ARCHS_tune-cortexa53-crypto = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa53 cortexa53-crypto" BASE_LIB_tune-cortexa53 = "lib64"
meta/conf/machine/include/tune-cortexa72.inc +2 -2
@@ -7,7 +7,7 @@ require conf/machine/include/arm/arch-armv8a.inc # Little Endian base configs AVAILTUNES += "cortexa72" -ARMPKGARCH_tune-cortexa72 = "cortexa72" -TUNE_FEATURES_tune-cortexa72 = "aarch64 cortexa72 crc crypto" +ARMPKGARCH_tune-cortexa72 ?= "cortexa72" +TUNE_FEATURES_tune-cortexa72 = "${TUNE_FEATURES_tune-armv8a-crc-crypto} cortexa72" PACKAGE_EXTRA_ARCHS_tune-cortexa72 = "${PACKAGE_EXTRA_ARCHS_tune-armv8a-crc-crypto} cortexa72" BASE_LIB_tune-cortexa72 = "lib64"
Signature · 1 line
2.12.0
Quoted 8 lines · Peter Kjellerstedt
These patches are intended to improve the ARM tunings and came about after I had to study the tune files a lot more than I first had anticipated...
The first patch (arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-*) avoids odd architectures such as "crc" and "crypto" to be included in
PACKAGE_EXTRA_ARCHS.
Quoted 7 lines
The following three patches (where i have sent the latter two to the list before) restores the "armv*" features to
TUNE_FEATURESfor all ARM based SoCs as it does not make sense to remove them from the SoC specific tune files just to determine whether -mcpu or -march shall be used. This is because the SoCs still support the armv* features specified in theirTUNE_FEATURESeven if they also have more specific SoC tunings.
It depends how you view TUNE_FEATURES and what the presence of things there is defined to mean.
"armv4t" is defined in the arm tune files to mean "add -march=armv4t" which is the convention used throughout all the tune files.
I'm still not convinced this part of your changes improves the situation as it then breaks and confuses that situation.
I'm also worried you're wanting this as you have code elsewhere which is using "armvX" there to mean something else?
Cheers,
Richard
Quoted 24 lines
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: den 2 april 2019 22:27
To: Peter Kjellerstedt <[email protected]>; openembedded- [email protected]
Subject: Re: [OE-core] [PATCH 0/6] Correct and improve the ARM tuningsQuoted 8 lines · Peter Kjellerstedt
These patches are intended to improve the ARM tunings and came about after I had to study the tune files a lot more than I first had anticipated...
The first patch (arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-*) avoids odd architectures such as "crc" and "crypto" to be included in
PACKAGE_EXTRA_ARCHS.Quoted 7 lines
The following three patches (where i have sent the latter two to the list before) restores the "armv*" features to
TUNE_FEATURESfor all ARM based SoCs as it does not make sense to remove them from the SoC specific tune files just to determine whether -mcpu or -march shall be used. This is because the SoCs still support the armv* features specified in theirTUNE_FEATURESeven if they also have more specific SoC tunings.
Quoted 2 lines
It depends how you view
TUNE_FEATURESand what the presence of things there is defined to mean.
The assumption I made was that the features listed in TUNE_FEATURES matches what features the compiler/linker will make use of when building the code and something that can be checked by, e.g., recipes to enable/disable functionality to match this. There are examples of this in the recipes in OE-Core, e.g., where TUNE_FEATURES is checked to determine what options to pass to configure.
E.g., with DEFAULTTUNE set to "arm926ejs", TUNE_FEATURES expands to "arm armv5 thumb dsp arm926ejs" (with Thud and older, or with my patches applied). To me this means that I can assume that I can use anything that is specific to either of those features when I decide what to build. And although arm926ejs implies armv5, having the latter as a separate feature makes it possible to write a generic test for armv5 without having to know the exact SoC and what it supports.
Quoted 2 lines
"armv4t" is defined in the arm tune files to mean "add -march=armv4t" which is the convention used throughout all the tune files.
I fail to see where it says that the "armv*" features of TUNE_FEATUES are to be used to set -march and nothing else. That seems like a very odd implication of one of the many features specified in TUNE_FEATURES.
However, with my patches applied, the "armv*" features still says to set -march, unless there is also a more specific tune feature, e.g., "arm926ejs", which means -mcpu will be used instead. I don't think deciding between -mcpu and -march should be based on the existence or non-existence of a given feature in TUNE_FEATURES, but rather on the context. This also matches how the TUNE_FEATURES_tune-arm* variables are being defined with more specific variables such as TUNE_FEATURES_tune-arm926ejs being defined based on more generic variables (TUNE_FEATURES_tune-armv5te in this case) and then adding the more specific feature(s).
Quoted 2 lines
I'm still not convinced this part of your changes improves the situation as it then breaks and confuses that situation.
According to my view there is less confusion now. TUNE_FEATURES yet again describes the features that are supported.
Quoted 2 lines
I'm also worried you're wanting this as you have code elsewhere which is using "armvX" there to mean something else?
Actually we're not using any such tests. I did the initial rework based on the notion that the change that had gone into the tuning files felt wrong, tearing out the structure that was previously there in the definitions of the TUNE_FEATURES_tune-arm* variables, and how it had messed up my view of what the features in TUNE_FEATURES are supposed to mean. And after having studied those files a lot more, that initial notion still holds true for me.
Quoted 3 lines
Cheers,
Richard
//Peter
Quoted 4 lines · Richard Purdie
...
"armv4t" is defined in the arm tune files to mean "add -march=armv4t" which is the convention used throughout all the tune files.
...
Unfortunately this is not true.
OE has both armv7a and armv7at tunes.
There is no armv7a without Thumb support,
so no -march=armv7-at exists in gcc.
Both armv7a and armv7at tunes pass the same march to gcc, but [1] is not true:
Default to using the Thumb-2 instruction set for armv7a and above.
The hardware supports Thumb-2 in any case, the actual difference between the armv7a and armv7at OE tunes is whether OE tells the compiler to generate ARM or Thumb-2 code.
OE has both armv6 and armv6t tunes.
There is no armv6 without Thumb support
so no -march=armv6t exists in gcc.
Some v6 support only Thumb-1 and some v6 support also Thumb-2, so what gcc does have is an -march=armv6t2.
But OE lacks tunes for that.
For matching the gcc options it would be correct to remove all armv6t and armv7at tunes that have no coresponding gcc options, and add armv6t2 tunes.
And that's only for the legacy 32bit platforms.
armv8 already has 21 feature modifiers in gcc 9, and while not all 2^21 or 3^21[2] combinations are valid the old tune approach won't scale for that.
Quoted 3 lines
Cheers,
Richard
cu
Adrian
[1] https://www.yoctoproject.org/docs/2.6/ref-manual/ref-manual.html#migration-2.6-miscellaneous-changes
[2] enable/disable/default
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 26 lines · Adrian Bunk
Quoted 4 lines · Richard Purdie
...
"armv4t" is defined in the arm tune files to mean "add -march=armv4t" which is the convention used throughout all the tune files.
...Unfortunately this is not true.
OE has both armv7a and armv7at tunes.
There is no armv7a without Thumb support,
so no -march=armv7-at exists in gcc.Both armv7a and armv7at tunes pass the same march to gcc, but [1] is not true:
Default to using the Thumb-2 instruction set for armv7a and above.The hardware supports Thumb-2 in any case, the actual difference between the armv7a and armv7at OE tunes is whether OE tells the compiler to generate ARM or Thumb-2 code.
OE has both armv6 and armv6t tunes.
There is no armv6 without Thumb support
so no -march=armv6t exists in gcc.
Quoted 7 lines
Some v6 support only Thumb-1 and some v6 support also Thumb-2, so what gcc does have is an -march=armv6t2.
But OE lacks tunes for that.For matching the gcc options it would be correct to remove all armv6t and armv7at tunes that have no coresponding gcc options, and add armv6t2 tunes.
Aligning the tuning options exposed via the machine config files to those supported by gcc seems like a worthy goal... but would be a big upheaval at this point.
Note that the problem isn't specific to ARM. There are similar issues for x86, but there we seem happy to provide a very minimal abstraction with no attempt to track gcc. e.g. "corei7" hasn't been a documented -march option since gcc 4.8 and we (somewhat arbitrarily) map it to -march=nehalem to hide that fact from end users.
So the high level question seems to be: should DEFAULTTUNE even attempt to provide a full featured mapping to the options provided by gcc? Are we happy to expose a limited subset without a 1:1 mapping for the options we do expose (current ARM approach) or is it better for DEFAULTTUNE to hide away all the complexity of the options provided by gcc (current x86 approach).
Quoted 28 lines
And that's only for the legacy 32bit platforms.
armv8 already has 21 feature modifiers in gcc 9, and while not all 2^21 or 3^21[2] combinations are valid the old tune approach won't scale for that.
Quoted 3 lines
Cheers,
Richard
cu
Adrian[1] https://www.yoctoproject.org/docs/2.6/ref-manual/ref-manual.html#migration-2.6-miscellaneous-changes
[2] enable/disable/default--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 45 lines · Andre McCurdy
Quoted 26 lines · Adrian Bunk
Quoted 4 lines · Richard Purdie
...
"armv4t" is defined in the arm tune files to mean "add -march=armv4t" which is the convention used throughout all the tune files.
...Unfortunately this is not true.
OE has both armv7a and armv7at tunes.
There is no armv7a without Thumb support,
so no -march=armv7-at exists in gcc.Both armv7a and armv7at tunes pass the same march to gcc, but [1] is not true:
Default to using the Thumb-2 instruction set for armv7a and above.The hardware supports Thumb-2 in any case, the actual difference between the armv7a and armv7at OE tunes is whether OE tells the compiler to generate ARM or Thumb-2 code.
OE has both armv6 and armv6t tunes.
There is no armv6 without Thumb support
so no -march=armv6t exists in gcc.Quoted 7 lines
Some v6 support only Thumb-1 and some v6 support also Thumb-2, so what gcc does have is an -march=armv6t2.
But OE lacks tunes for that.For matching the gcc options it would be correct to remove all armv6t and armv7at tunes that have no coresponding gcc options, and add armv6t2 tunes.
Aligning the tuning options exposed via the machine config files to those supported by gcc seems like a worthy goal... but would be a big upheaval at this point.
Note that the problem isn't specific to ARM. There are similar issues for x86, but there we seem happy to provide a very minimal abstraction with no attempt to track gcc. e.g. "corei7" hasn't been a documented
(quoted diff) +0
-2-march option since gcc 4.8 and we (somewhat arbitrarily) map it to -march=nehalem to hide that fact from end users.
Quoted 6 lines
So the high level question seems to be: should DEFAULTTUNE even attempt to provide a full featured mapping to the options provided by gcc? Are we happy to expose a limited subset without a 1:1 mapping for the options we do expose (current ARM approach) or is it better for DEFAULTTUNE to hide away all the complexity of the options provided by gcc (current x86 approach).
The current 32bit ARM[1] approach seems to be an attempt of a 1:1 mapping.
For ARMv8 it is already obvious that DEFAULTTUNE is not long-term maintainable, and duplicating all the gcc rules regarding feature flags[2] also sounds like a pointless exercise.
What are actually the benefits of DEFAULTTUNE with all the tune files, compared to just let the user provide a string that is passed to -march?
cu
Adrian
[1] ARM <= v7, not the differing 32bit ABI of ARMv8
[2] example:
'fp16fml'
Enable FP16 fmla extension. This also enables FP16 extensions and floating-point instructions. This option is enabled by default for '-march=armv8.4-a'. Use of this option with architectures prior to Armv8.2-A is not supported.
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedQuoted 56 lines · Adrian Bunk
Quoted 45 lines · Andre McCurdy
Quoted 26 lines · Adrian Bunk
Quoted 4 lines · Richard Purdie
...
"armv4t" is defined in the arm tune files to mean "add -march=armv4t" which is the convention used throughout all the tune files.
...Unfortunately this is not true.
OE has both armv7a and armv7at tunes.
There is no armv7a without Thumb support,
so no -march=armv7-at exists in gcc.Both armv7a and armv7at tunes pass the same march to gcc, but [1] is not true:
Default to using the Thumb-2 instruction set for armv7a and above.The hardware supports Thumb-2 in any case, the actual difference between the armv7a and armv7at OE tunes is whether OE tells the compiler to generate ARM or Thumb-2 code.
OE has both armv6 and armv6t tunes.
There is no armv6 without Thumb support
so no -march=armv6t exists in gcc.Quoted 7 lines
Some v6 support only Thumb-1 and some v6 support also Thumb-2, so what gcc does have is an -march=armv6t2.
But OE lacks tunes for that.For matching the gcc options it would be correct to remove all armv6t and armv7at tunes that have no coresponding gcc options, and add armv6t2 tunes.
Aligning the tuning options exposed via the machine config files to those supported by gcc seems like a worthy goal... but would be a big upheaval at this point.
Note that the problem isn't specific to ARM. There are similar issues for x86, but there we seem happy to provide a very minimal abstraction with no attempt to track gcc. e.g. "corei7" hasn't been a documented
(quoted diff) +0
-2-march option since gcc 4.8 and we (somewhat arbitrarily) map it to -march=nehalem to hide that fact from end users.Quoted 6 lines
So the high level question seems to be: should DEFAULTTUNE even attempt to provide a full featured mapping to the options provided by gcc? Are we happy to expose a limited subset without a 1:1 mapping for the options we do expose (current ARM approach) or is it better for DEFAULTTUNE to hide away all the complexity of the options provided by gcc (current x86 approach).
The current 32bit ARM[1] approach seems to be an attempt of a 1:1 mapping.
Quoted 6 lines
For ARMv8 it is already obvious that DEFAULTTUNE is not long-term maintainable, and duplicating all the gcc rules regarding feature flags[2] also sounds like a pointless exercise.
What are actually the benefits of DEFAULTTUNE with all the tune files, compared to just let the user provide a string that is passed to -march?
Restricting the user to a certain set of DEFAULTTUNE options means there will always be a valid mapping from DEFAULTTUNE to PACKAGE_EXTRA_ARCHS.
If we let the user pass an arbitrary string to -march then we lose the ability to determine that (for example) it's safe for a "armv7athf-vfpv3" machine to pull from a "armv7athf-vfpv3d16" package feed.
Whether or not anyone in the real world actually maintains a generic package feed and pulls from it from multiple machine specific builds (verses setting up separate package feeds for each DEFAULTTUNE they care about) would be an interesting question...
Quoted 19 lines
cu
Adrian[1] ARM <= v7, not the differing 32bit ABI of ARMv8
[2] example:
'fp16fml'
Enable FP16 fmla extension. This also enables FP16 extensions and floating-point instructions. This option is enabled by default for '-march=armv8.4-a'. Use of this option with architectures prior to Armv8.2-A is not supported.--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Quoted 5 lines · Andre McCurdy
...
If we let the user pass an arbitrary string to -march then we lose the ability to determine that (for example) it's safe for a "armv7athf-vfpv3" machine to pull from a "armv7athf-vfpv3d16" package feed.
For ARM <= v7 this is possible, except for bugs like the mentioned around thumb.
With ARMv8 you end up duplicating everything gcc knows about architecture and feature flags for a cpu, and about all the interdependencies between features flags.
It will also have to tell whether a cpu contains the optional support for the old ARMv7 32bit ABI, or only for the ILP32 variant of the ARMv8 ABI.
Quoted 4 lines
Whether or not anyone in the real world actually maintains a generic package feed and pulls from it from multiple machine specific builds (verses setting up separate package feeds for each DEFAULTTUNE they care about) would be an interesting question...
It would be good to look at what exactly has to be supported here, and the complexity involved.
The simplest "generic" would be armv8.0 with no feature flags.
If a generic "is tune A a superset of tune B" is required, you end up duplicating a lot of hardware information from gcc.
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedIt's not caused by this change (not the previous one I believe), but today I've noticed that aarch64 tunes don't set TUNE_PKGARCH correctly.
e.g. with raspberrypi3-64 which since this commit:
https://github.com/agherzan/meta-raspberrypi/commit/9cc89cb7341d633b6fc3a92b937b5560d26257a1
uses conf/machine/include/tune-cortexa53.inc I was expecting it to use cortexa53 specific TUNE_PKGARCH (and stop messing with other MACHINEs which are using aarch64 package feed).
There is indeed:
DEFAULTTUNE="cortexa53"
and mcpu=cortex-a53+crc in CC:
export CC="aarch64-webos-linux-gcc -mcpu=cortex-a53+crc --sysroot=/OE/build/luneos-warrior/webos-ports/tmp-glibc/work/aarch64-webos-linux/zlib/1.2.11-r0/recipe-sysroot"
But
ARMPKGARCH="cortexa53"
# $TUNE_PKGARCH_32
# set
/OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:29 #
"${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
TUNE_PKGARCH_32="cortexa53"
#
# $TUNE_PKGARCH_64
# set
/OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:23
# "aarch64${ARMPKGSFX_ENDIAN_64}"
TUNE_PKGARCH_64="aarch64"
# "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}',
'${TUNE_PKGARCH_32}' ,d)}"
TUNE_PKGARCH="aarch64"
so the packages built with -mcpu=cortex-a53+crc (and rpi overrides) end in the same TUNE_PKGARCH as other MACHINEs which include e.g. conf/machine/include/arm/arch-arm64.inc and DEFAULTTUNE="aarch64" which surprisingly uses aarch64 in both TUNE_PKGARCH_32/64:
# "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}',
'${TUNE_PKGARCH_32}' ,d)}"
TUNE_PKGARCH="aarch64"
#
# $TUNE_PKGARCH_32
# set
/OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:29 #
"${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
TUNE_PKGARCH_32="aarch64"
#
# $TUNE_PKGARCH_64
# set
/OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:23
# "aarch64${ARMPKGSFX_ENDIAN_64}"
TUNE_PKGARCH_64="aarch64"
Looks like aarch64 are even bigger mess than arm tunes already :/.
Quoted 105 lines · Andre McCurdy
Quoted 5 lines · Adrian Bunk
Quoted 4 lines · Andre McCurdy
Quoted 3 lines · Adrian Bunk
Quoted 2 lines · Richard Purdie
...
"armv4t" is defined in the arm tune files to mean "add-march=armv4t"
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
which is the convention used throughout all the tune files.
...Unfortunately this is not true.
OE has both armv7a and armv7at tunes.
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
There is no armv7a without Thumb support,
so no -march=armv7-at exists in gcc.Both armv7a and armv7at tunes pass the same march to gcc, but [1] is not true:
Default to using the Thumb-2 instruction set for armv7a and above.The hardware supports Thumb-2 in any case, the actual difference
between
Quoted 36 lines
Quoted 26 lines
Quoted 8 lines
the armv7a and armv7at OE tunes is whether OE tells the compiler to generate ARM or Thumb-2 code.
OE has both armv6 and armv6t tunes.
There is no armv6 without Thumb support
so no -march=armv6t exists in gcc.Quoted 7 lines
Some v6 support only Thumb-1 and some v6 support also Thumb-2, so what gcc does have is an -march=armv6t2.
But OE lacks tunes for that.For matching the gcc options it would be correct to remove all armv6t and armv7at tunes that have no coresponding gcc options, and add armv6t2 tunes.
Aligning the tuning options exposed via the machine config files to those supported by gcc seems like a worthy goal... but would be a big upheaval at this point.
Note that the problem isn't specific to ARM. There are similar issues for x86, but there we seem happy to provide a very minimal abstraction with no attempt to track gcc. e.g. "corei7" hasn't been a documented
(quoted diff) +0
-2-march option since gcc 4.8 and we (somewhat arbitrarily) map it to -march=nehalem to hide that fact from end users.Quoted 6 lines
So the high level question seems to be: should DEFAULTTUNE even attempt to provide a full featured mapping to the options provided by gcc? Are we happy to expose a limited subset without a 1:1 mapping for the options we do expose (current ARM approach) or is it better for DEFAULTTUNE to hide away all the complexity of the options provided by gcc (current x86 approach).
The current 32bit ARM[1] approach seems to be an attempt of a 1:1 mapping.
Quoted 6 lines
For ARMv8 it is already obvious that DEFAULTTUNE is not long-term maintainable, and duplicating all the gcc rules regarding feature flags[2] also sounds like a pointless exercise.
What are actually the benefits of DEFAULTTUNE with all the tune files, compared to just let the user provide a string that is passed to -march?
Restricting the user to a certain set of DEFAULTTUNE options means there will always be a valid mapping from DEFAULTTUNE to
PACKAGE_EXTRA_ARCHS.If we let the user pass an arbitrary string to -march then we lose the ability to determine that (for example) it's safe for a "armv7athf-vfpv3" machine to pull from a "armv7athf-vfpv3d16" package feed.
Whether or not anyone in the real world actually maintains a generic package feed and pulls from it from multiple machine specific builds (verses setting up separate package feeds for each DEFAULTTUNE they care about) would be an interesting question...
Quoted 12 lines
cu
Adrian[1] ARM <= v7, not the differing 32bit ABI of ARMv8
[2] example:
'fp16fml'
Enable FP16 fmla extension. This also enables FP16 extensions and floating-point instructions. This option is enabled by default for '-march=armv8.4-a'. Use of this option with architectures prior to Armv8.2-A is not supported.Quoted 7 lines
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Yes, that definitely looks wrong. Fortunately for us, we are only using SoCs based on Cortex A53 so far so it is not something that has affected us (yet)…
Oh, and for some more messy fun, take a look at tune-cortexa32.inc. Cortex A32 uses ARMv8 but only supports aarch32. However, the tune file says to use aarch64, which makes me believe that no one is actually using that tune file… I gave up trying to correct is as it is not currently possible to configure a tune to use ARMv8 without aarch64 and I don’t know if it is worth the effort until someone actually has a SoC based on Cortex A32 they want to build for.
//Peter
From: Martin Jansa <[email protected]>
Sent: den 17 april 2019 10:33
To: Andre McCurdy <[email protected]>
Cc: Adrian Bunk <[email protected]>; Peter Kjellerstedt <[email protected]>; OE Core mailing list <[email protected]>
Subject: Re: [OE-core] [PATCH 0/6] Correct and improve the ARM tunings
It's not caused by this change (not the previous one I believe), but today I've noticed that aarch64 tunes don't set TUNE_PKGARCH correctly.
e.g. with raspberrypi3-64 which since this commit:
https://github.com/agherzan/meta-raspberrypi/commit/9cc89cb7341d633b6fc3a92b937b5560d26257a1
uses conf/machine/include/tune-cortexa53.inc I was expecting it to use cortexa53 specific TUNE_PKGARCH (and stop messing with other MACHINEs which are using aarch64 package feed).
There is indeed:
DEFAULTTUNE="cortexa53"
and mcpu=cortex-a53+crc in CC:
export CC="aarch64-webos-linux-gcc -mcpu=cortex-a53+crc --sysroot=/OE/build/luneos-warrior/webos-ports/tmp-glibc/work/aarch64-webos-linux/zlib/1.2.11-r0/recipe-sysroot"
But
ARMPKGARCH="cortexa53"
# $TUNE_PKGARCH_32
# set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:29
# "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
TUNE_PKGARCH_32="cortexa53"
#
# $TUNE_PKGARCH_64
# set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:23
# "aarch64${ARMPKGSFX_ENDIAN_64}"
TUNE_PKGARCH_64="aarch64"
# "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}', '${TUNE_PKGARCH_32}' ,d)}<mailto:$%[email protected]('TUNE_FEATURES',%20'aarch64',%20'$%7bTUNE_PKGARCH_64%7d',%20'$%7bTUNE_PKGARCH_32%7d'%20,d)%7d>"
TUNE_PKGARCH="aarch64"
so the packages built with -mcpu=cortex-a53+crc (and rpi overrides) end in the same TUNE_PKGARCH as other MACHINEs which include e.g. conf/machine/include/arm/arch-arm64.inc and DEFAULTTUNE="aarch64" which surprisingly uses aarch64 in both TUNE_PKGARCH_32/64:
# "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}', '${TUNE_PKGARCH_32}' ,d)}<mailto:$%[email protected]('TUNE_FEATURES',%20'aarch64',%20'$%7bTUNE_PKGARCH_64%7d',%20'$%7bTUNE_PKGARCH_32%7d'%20,d)%7d>"
TUNE_PKGARCH="aarch64"
#
# $TUNE_PKGARCH_32
# set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:29
# "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
TUNE_PKGARCH_32="aarch64"
#
# $TUNE_PKGARCH_64
# set /OE/build/luneos-warrior/webos-ports/openembedded-core/meta/conf/machine/include/arm/arch-arm64.inc:23
# "aarch64${ARMPKGSFX_ENDIAN_64}"
TUNE_PKGARCH_64="aarch64"
Looks like aarch64 are even bigger mess than arm tunes already :/.
On Wed, Apr 3, 2019 at 10:48 PM Andre McCurdy <[email protected]<mailto:[email protected]>> wrote:
Quoted 56 lines · On Wed, Apr 3, 2019 at 1:24 PM Adrian Bunk…
Quoted 45 lines · Andre McCurdy
Quoted 26 lines · On Tue, Apr 2, 2019 at 11:23 PM Adrian Bunk…
Quoted 4 lines · Richard Purdie
...
"armv4t" is defined in the arm tune files to mean "add -march=armv4t" which is the convention used throughout all the tune files.
...Unfortunately this is not true.
OE has both armv7a and armv7at tunes.
There is no armv7a without Thumb support,
so no -march=armv7-at exists in gcc.Both armv7a and armv7at tunes pass the same march to gcc, but [1] is not true:
Default to using the Thumb-2 instruction set for armv7a and above.The hardware supports Thumb-2 in any case, the actual difference between the armv7a and armv7at OE tunes is whether OE tells the compiler to generate ARM or Thumb-2 code.
OE has both armv6 and armv6t tunes.
There is no armv6 without Thumb support
so no -march=armv6t exists in gcc.Quoted 7 lines
Some v6 support only Thumb-1 and some v6 support also Thumb-2, so what gcc does have is an -march=armv6t2.
But OE lacks tunes for that.For matching the gcc options it would be correct to remove all armv6t and armv7at tunes that have no coresponding gcc options, and add armv6t2 tunes.
Aligning the tuning options exposed via the machine config files to those supported by gcc seems like a worthy goal... but would be a big upheaval at this point.
Note that the problem isn't specific to ARM. There are similar issues for x86, but there we seem happy to provide a very minimal abstraction with no attempt to track gcc. e.g. "corei7" hasn't been a documented
(quoted diff) +0
-2-march option since gcc 4.8 and we (somewhat arbitrarily) map it to -march=nehalem to hide that fact from end users.Quoted 6 lines
So the high level question seems to be: should DEFAULTTUNE even attempt to provide a full featured mapping to the options provided by gcc? Are we happy to expose a limited subset without a 1:1 mapping for the options we do expose (current ARM approach) or is it better for DEFAULTTUNE to hide away all the complexity of the options provided by gcc (current x86 approach).
The current 32bit ARM[1] approach seems to be an attempt of a 1:1 mapping.
Quoted 6 lines
For ARMv8 it is already obvious that DEFAULTTUNE is not long-term maintainable, and duplicating all the gcc rules regarding feature flags[2] also sounds like a pointless exercise.
What are actually the benefits of DEFAULTTUNE with all the tune files, compared to just let the user provide a string that is passed to -march?
Restricting the user to a certain set of DEFAULTTUNE options means there will always be a valid mapping from DEFAULTTUNE to PACKAGE_EXTRA_ARCHS.
If we let the user pass an arbitrary string to -march then we lose the ability to determine that (for example) it's safe for a "armv7athf-vfpv3" machine to pull from a "armv7athf-vfpv3d16" package feed.
Whether or not anyone in the real world actually maintains a generic package feed and pulls from it from multiple machine specific builds (verses setting up separate package feeds for each DEFAULTTUNE they care about) would be an interesting question...
Quoted 12 lines
cu
Adrian[1] ARM <= v7, not the differing 32bit ABI of ARMv8
[2] example:
'fp16fml'
Enable FP16 fmla extension. This also enables FP16 extensions and floating-point instructions. This option is enabled by default for '-march=armv8.4-a'. Use of this option with architectures prior to Armv8.2-A is not supported.
Quoted 7 lines
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
_______________________________________________
Openembedded-core mailing list [email protected]<mailto:[email protected]>
http://lists.openembedded.org/mailman/listinfo/openembedded-core