All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Correct and improve the ARM tunings
@ 2019-04-02 19:30 Peter Kjellerstedt
  2019-04-02 19:30 ` [PATCH 1/6] arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-* Peter Kjellerstedt
                   ` (6 more replies)
  0 siblings, 7 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 19:30 UTC (permalink / raw)
  To: openembedded-core

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

-- 
2.12.0



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

* [PATCH 1/6] arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-*
  2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
@ 2019-04-02 19:30 ` Peter Kjellerstedt
  2019-04-02 19:31 ` [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches" Peter Kjellerstedt
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 19:30 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/conf/machine/include/arm/arch-armv8a.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/conf/machine/include/arm/arch-armv8a.inc b/meta/conf/machine/include/arm/arch-armv8a.inc
index 44d0ca4557..f810a1e8fc 100644
--- a/meta/conf/machine/include/arm/arch-armv8a.inc
+++ b/meta/conf/machine/include/arm/arch-armv8a.inc
@@ -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"
-- 
2.12.0



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

* [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches"
  2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
  2019-04-02 19:30 ` [PATCH 1/6] arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-* Peter Kjellerstedt
@ 2019-04-02 19:31 ` Peter Kjellerstedt
  2019-04-02 20:52   ` akuster808
  2019-04-02 19:31 ` [PATCH 3/6] Revert "arm-tunes: Remove -march option if mcpu is already added" Peter Kjellerstedt
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 19:31 UTC (permalink / raw)
  To: openembedded-core

This reverts commit 1d6d5bb30a83f9136b7c33e297d48564ae61b50e.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/conf/machine/include/arm/arch-armv5-dsp.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/machine/include/arm/arch-armv5-dsp.inc b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
index d117af1520..1f16085fcd 100644
--- a/meta/conf/machine/include/arm/arch-armv5-dsp.inc
+++ b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
@@ -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
-- 
2.12.0



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

* [PATCH 3/6] Revert "arm-tunes: Remove -march option if mcpu is already added"
  2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
  2019-04-02 19:30 ` [PATCH 1/6] arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-* Peter Kjellerstedt
  2019-04-02 19:31 ` [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches" Peter Kjellerstedt
@ 2019-04-02 19:31 ` Peter Kjellerstedt
  2019-04-02 19:31 ` [PATCH 4/6] arm-tunes: Prefer the -mcpu option over -march Peter Kjellerstedt
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 19:31 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 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(-)

diff --git a/meta/conf/machine/include/tune-arm1136jf-s.inc b/meta/conf/machine/include/tune-arm1136jf-s.inc
index d883eba7c9..c5de63e1cc 100644
--- a/meta/conf/machine/include/tune-arm1136jf-s.inc
+++ b/meta/conf/machine/include/tune-arm1136jf-s.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-arm920t.inc b/meta/conf/machine/include/tune-arm920t.inc
index 42e8ed2b51..c6e74b6772 100644
--- a/meta/conf/machine/include/tune-arm920t.inc
+++ b/meta/conf/machine/include/tune-arm920t.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-arm926ejs.inc b/meta/conf/machine/include/tune-arm926ejs.inc
index 563d53bc4e..81bcda339b 100644
--- a/meta/conf/machine/include/tune-arm926ejs.inc
+++ b/meta/conf/machine/include/tune-arm926ejs.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-arm9tdmi.inc b/meta/conf/machine/include/tune-arm9tdmi.inc
index e03a8b86a0..e9c2b8fcf5 100644
--- a/meta/conf/machine/include/tune-arm9tdmi.inc
+++ b/meta/conf/machine/include/tune-arm9tdmi.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa15.inc b/meta/conf/machine/include/tune-cortexa15.inc
index d53403af35..25e99f93d7 100644
--- a/meta/conf/machine/include/tune-cortexa15.inc
+++ b/meta/conf/machine/include/tune-cortexa15.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa17.inc b/meta/conf/machine/include/tune-cortexa17.inc
index 3ffc02bf9f..40392f9bcc 100644
--- a/meta/conf/machine/include/tune-cortexa17.inc
+++ b/meta/conf/machine/include/tune-cortexa17.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa5.inc b/meta/conf/machine/include/tune-cortexa5.inc
index 496739e454..e9eddb407f 100644
--- a/meta/conf/machine/include/tune-cortexa5.inc
+++ b/meta/conf/machine/include/tune-cortexa5.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa7.inc b/meta/conf/machine/include/tune-cortexa7.inc
index 34a77b4788..52415d9c8b 100644
--- a/meta/conf/machine/include/tune-cortexa7.inc
+++ b/meta/conf/machine/include/tune-cortexa7.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa8.inc b/meta/conf/machine/include/tune-cortexa8.inc
index 6551ba4952..8ee8de97f1 100644
--- a/meta/conf/machine/include/tune-cortexa8.inc
+++ b/meta/conf/machine/include/tune-cortexa8.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa9.inc b/meta/conf/machine/include/tune-cortexa9.inc
index ecc7908cd7..0cf323c960 100644
--- a/meta/conf/machine/include/tune-cortexa9.inc
+++ b/meta/conf/machine/include/tune-cortexa9.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-ep9312.inc b/meta/conf/machine/include/tune-ep9312.inc
index 4d92821628..84ca528d6d 100644
--- a/meta/conf/machine/include/tune-ep9312.inc
+++ b/meta/conf/machine/include/tune-ep9312.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-iwmmxt.inc b/meta/conf/machine/include/tune-iwmmxt.inc
index 9a6cd23c99..f27423cb2e 100644
--- a/meta/conf/machine/include/tune-iwmmxt.inc
+++ b/meta/conf/machine/include/tune-iwmmxt.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-strongarm1100.inc b/meta/conf/machine/include/tune-strongarm1100.inc
index e978e925d2..80cfb8ab8a 100644
--- a/meta/conf/machine/include/tune-strongarm1100.inc
+++ b/meta/conf/machine/include/tune-strongarm1100.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-xscale.inc b/meta/conf/machine/include/tune-xscale.inc
index 19d5e13e61..0d07333955 100644
--- a/meta/conf/machine/include/tune-xscale.inc
+++ b/meta/conf/machine/include/tune-xscale.inc
@@ -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"
-- 
2.12.0



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

* [PATCH 4/6] arm-tunes: Prefer the -mcpu option over -march
  2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
                   ` (2 preceding siblings ...)
  2019-04-02 19:31 ` [PATCH 3/6] Revert "arm-tunes: Remove -march option if mcpu is already added" Peter Kjellerstedt
@ 2019-04-02 19:31 ` Peter Kjellerstedt
  2019-04-02 19:31 ` [PATCH 5/6] arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES Peter Kjellerstedt
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 19:31 UTC (permalink / raw)
  To: openembedded-core

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

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 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(-)

diff --git a/meta/conf/machine/include/arm/arch-arm.inc b/meta/conf/machine/include/arm/arch-arm.inc
index 99625d8417..188cf8b473 100644
--- a/meta/conf/machine/include/arm/arch-arm.inc
+++ b/meta/conf/machine/include/arm/arch-arm.inc
@@ -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'}"
diff --git a/meta/conf/machine/include/arm/arch-armv4.inc b/meta/conf/machine/include/arm/arch-armv4.inc
index 47a7ad2830..dac791e308 100644
--- a/meta/conf/machine/include/arm/arch-armv4.inc
+++ b/meta/conf/machine/include/arm/arch-armv4.inc
@@ -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
diff --git a/meta/conf/machine/include/arm/arch-armv5.inc b/meta/conf/machine/include/arm/arch-armv5.inc
index f9068af9de..9c82015df2 100644
--- a/meta/conf/machine/include/arm/arch-armv5.inc
+++ b/meta/conf/machine/include/arm/arch-armv5.inc
@@ -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
diff --git a/meta/conf/machine/include/arm/arch-armv6.inc b/meta/conf/machine/include/arm/arch-armv6.inc
index 6c838e999c..ece29aab8e 100644
--- a/meta/conf/machine/include/arm/arch-armv6.inc
+++ b/meta/conf/machine/include/arm/arch-armv6.inc
@@ -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
diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc b/meta/conf/machine/include/arm/arch-armv7a.inc
index 199e63f98a..c09fb548c2 100644
--- a/meta/conf/machine/include/arm/arch-armv7a.inc
+++ b/meta/conf/machine/include/arm/arch-armv7a.inc
@@ -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
diff --git a/meta/conf/machine/include/arm/arch-armv7ve.inc b/meta/conf/machine/include/arm/arch-armv7ve.inc
index fc172d0cb0..810abd2008 100644
--- a/meta/conf/machine/include/arm/arch-armv7ve.inc
+++ b/meta/conf/machine/include/arm/arch-armv7ve.inc
@@ -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
diff --git a/meta/conf/machine/include/arm/arch-armv8a.inc b/meta/conf/machine/include/arm/arch-armv8a.inc
index f810a1e8fc..9751594bf4 100644
--- a/meta/conf/machine/include/arm/arch-armv8a.inc
+++ b/meta/conf/machine/include/arm/arch-armv8a.inc
@@ -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
diff --git a/meta/conf/machine/include/tune-arm1136jf-s.inc b/meta/conf/machine/include/tune-arm1136jf-s.inc
index c5de63e1cc..e29ac9d8d2 100644
--- a/meta/conf/machine/include/tune-arm1136jf-s.inc
+++ b/meta/conf/machine/include/tune-arm1136jf-s.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-arm920t.inc b/meta/conf/machine/include/tune-arm920t.inc
index c6e74b6772..02fbed41a1 100644
--- a/meta/conf/machine/include/tune-arm920t.inc
+++ b/meta/conf/machine/include/tune-arm920t.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-arm926ejs.inc b/meta/conf/machine/include/tune-arm926ejs.inc
index 81bcda339b..70179b59e4 100644
--- a/meta/conf/machine/include/tune-arm926ejs.inc
+++ b/meta/conf/machine/include/tune-arm926ejs.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-arm9tdmi.inc b/meta/conf/machine/include/tune-arm9tdmi.inc
index e9c2b8fcf5..013f6ba846 100644
--- a/meta/conf/machine/include/tune-arm9tdmi.inc
+++ b/meta/conf/machine/include/tune-arm9tdmi.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa15.inc b/meta/conf/machine/include/tune-cortexa15.inc
index 25e99f93d7..2ca38c59cc 100644
--- a/meta/conf/machine/include/tune-cortexa15.inc
+++ b/meta/conf/machine/include/tune-cortexa15.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa17.inc b/meta/conf/machine/include/tune-cortexa17.inc
index 40392f9bcc..048a7be420 100644
--- a/meta/conf/machine/include/tune-cortexa17.inc
+++ b/meta/conf/machine/include/tune-cortexa17.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa32.inc b/meta/conf/machine/include/tune-cortexa32.inc
index 9c948f1766..c50470203c 100644
--- a/meta/conf/machine/include/tune-cortexa32.inc
+++ b/meta/conf/machine/include/tune-cortexa32.inc
@@ -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
 
diff --git a/meta/conf/machine/include/tune-cortexa35.inc b/meta/conf/machine/include/tune-cortexa35.inc
index d6df6cd6bd..0b082ce259 100644
--- a/meta/conf/machine/include/tune-cortexa35.inc
+++ b/meta/conf/machine/include/tune-cortexa35.inc
@@ -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
 
diff --git a/meta/conf/machine/include/tune-cortexa5.inc b/meta/conf/machine/include/tune-cortexa5.inc
index e9eddb407f..fee874b224 100644
--- a/meta/conf/machine/include/tune-cortexa5.inc
+++ b/meta/conf/machine/include/tune-cortexa5.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa53.inc b/meta/conf/machine/include/tune-cortexa53.inc
index 6c0b443eaf..b3bd8bbc4e 100644
--- a/meta/conf/machine/include/tune-cortexa53.inc
+++ b/meta/conf/machine/include/tune-cortexa53.inc
@@ -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
 
diff --git a/meta/conf/machine/include/tune-cortexa7.inc b/meta/conf/machine/include/tune-cortexa7.inc
index 52415d9c8b..79a395fe3f 100644
--- a/meta/conf/machine/include/tune-cortexa7.inc
+++ b/meta/conf/machine/include/tune-cortexa7.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa72.inc b/meta/conf/machine/include/tune-cortexa72.inc
index 00f7745a22..1ed456f1a9 100644
--- a/meta/conf/machine/include/tune-cortexa72.inc
+++ b/meta/conf/machine/include/tune-cortexa72.inc
@@ -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
 
diff --git a/meta/conf/machine/include/tune-cortexa8.inc b/meta/conf/machine/include/tune-cortexa8.inc
index 8ee8de97f1..05dda1a51e 100644
--- a/meta/conf/machine/include/tune-cortexa8.inc
+++ b/meta/conf/machine/include/tune-cortexa8.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa9.inc b/meta/conf/machine/include/tune-cortexa9.inc
index 0cf323c960..ff4e8ebfe1 100644
--- a/meta/conf/machine/include/tune-cortexa9.inc
+++ b/meta/conf/machine/include/tune-cortexa9.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-ep9312.inc b/meta/conf/machine/include/tune-ep9312.inc
index 84ca528d6d..6c4c9aa044 100644
--- a/meta/conf/machine/include/tune-ep9312.inc
+++ b/meta/conf/machine/include/tune-ep9312.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-iwmmxt.inc b/meta/conf/machine/include/tune-iwmmxt.inc
index f27423cb2e..26e84cb8f4 100644
--- a/meta/conf/machine/include/tune-iwmmxt.inc
+++ b/meta/conf/machine/include/tune-iwmmxt.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-strongarm1100.inc b/meta/conf/machine/include/tune-strongarm1100.inc
index 80cfb8ab8a..3b6ab6b130 100644
--- a/meta/conf/machine/include/tune-strongarm1100.inc
+++ b/meta/conf/machine/include/tune-strongarm1100.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-thunderx.inc b/meta/conf/machine/include/tune-thunderx.inc
index 92adf2df1f..83d514614f 100644
--- a/meta/conf/machine/include/tune-thunderx.inc
+++ b/meta/conf/machine/include/tune-thunderx.inc
@@ -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
 
diff --git a/meta/conf/machine/include/tune-xscale.inc b/meta/conf/machine/include/tune-xscale.inc
index 0d07333955..64081b11c6 100644
--- a/meta/conf/machine/include/tune-xscale.inc
+++ b/meta/conf/machine/include/tune-xscale.inc
@@ -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"
-- 
2.12.0



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

* [PATCH 5/6] arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES
  2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
                   ` (3 preceding siblings ...)
  2019-04-02 19:31 ` [PATCH 4/6] arm-tunes: Prefer the -mcpu option over -march Peter Kjellerstedt
@ 2019-04-02 19:31 ` Peter Kjellerstedt
  2019-04-02 19:31 ` [PATCH 6/6] arm-tunes: Add armv8a to TUNE_FEATURES as appropriate Peter Kjellerstedt
  2019-04-02 20:26 ` [PATCH 0/6] Correct and improve the ARM tunings Richard Purdie
  6 siblings, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 19:31 UTC (permalink / raw)
  To: openembedded-core

This makes sure, e.g., ${SOC_FAMILY} and ${MACHINE} have higher
priorities than aarch64.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/conf/machine/include/arm/arch-arm64.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/machine/include/arm/arch-arm64.inc b/meta/conf/machine/include/arm/arch-arm64.inc
index 5f90763f7f..53f4566815 100644
--- a/meta/conf/machine/include/arm/arch-arm64.inc
+++ b/meta/conf/machine/include/arm/arch-arm64.inc
@@ -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"
-- 
2.12.0



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

* [PATCH 6/6] arm-tunes: Add armv8a to TUNE_FEATURES as appropriate
  2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
                   ` (4 preceding siblings ...)
  2019-04-02 19:31 ` [PATCH 5/6] arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES Peter Kjellerstedt
@ 2019-04-02 19:31 ` Peter Kjellerstedt
  2019-04-02 20:26 ` [PATCH 0/6] Correct and improve the ARM tunings Richard Purdie
  6 siblings, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 19:31 UTC (permalink / raw)
  To: openembedded-core

This adds the armv8a tuning for Cortex-A32, Cortex-A35, Cortex-A53 and
Cortex-A72. This matches the other ARM tunes.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 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(-)

diff --git a/meta/conf/machine/include/tune-cortexa32.inc b/meta/conf/machine/include/tune-cortexa32.inc
index c50470203c..a150540845 100644
--- a/meta/conf/machine/include/tune-cortexa32.inc
+++ b/meta/conf/machine/include/tune-cortexa32.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa35.inc b/meta/conf/machine/include/tune-cortexa35.inc
index 0b082ce259..f57b0bd6e9 100644
--- a/meta/conf/machine/include/tune-cortexa35.inc
+++ b/meta/conf/machine/include/tune-cortexa35.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa53.inc b/meta/conf/machine/include/tune-cortexa53.inc
index b3bd8bbc4e..48de368328 100644
--- a/meta/conf/machine/include/tune-cortexa53.inc
+++ b/meta/conf/machine/include/tune-cortexa53.inc
@@ -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"
diff --git a/meta/conf/machine/include/tune-cortexa72.inc b/meta/conf/machine/include/tune-cortexa72.inc
index 1ed456f1a9..b527c5abaf 100644
--- a/meta/conf/machine/include/tune-cortexa72.inc
+++ b/meta/conf/machine/include/tune-cortexa72.inc
@@ -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"
-- 
2.12.0



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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
                   ` (5 preceding siblings ...)
  2019-04-02 19:31 ` [PATCH 6/6] arm-tunes: Add armv8a to TUNE_FEATURES as appropriate Peter Kjellerstedt
@ 2019-04-02 20:26 ` Richard Purdie
  2019-04-02 22:27   ` Peter Kjellerstedt
  2019-04-03  6:22   ` Adrian Bunk
  6 siblings, 2 replies; 18+ messages in thread
From: Richard Purdie @ 2019-04-02 20:26 UTC (permalink / raw)
  To: Peter Kjellerstedt, openembedded-core

On Tue, 2019-04-02 at 21:30 +0200, Peter Kjellerstedt wrote:
> 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.

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




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

* Re: [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches"
  2019-04-02 19:31 ` [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches" Peter Kjellerstedt
@ 2019-04-02 20:52   ` akuster808
  2019-04-02 22:29     ` Peter Kjellerstedt
  0 siblings, 1 reply; 18+ messages in thread
From: akuster808 @ 2019-04-02 20:52 UTC (permalink / raw)
  To: Peter Kjellerstedt, openembedded-core

Peter

On 4/2/19 12:31 PM, Peter Kjellerstedt wrote:
> 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
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
>  meta/conf/machine/include/arm/arch-armv5-dsp.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/conf/machine/include/arm/arch-armv5-dsp.inc b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
> index d117af1520..1f16085fcd 100644
> --- a/meta/conf/machine/include/arm/arch-armv5-dsp.inc
> +++ b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
> @@ -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



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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-02 20:26 ` [PATCH 0/6] Correct and improve the ARM tunings Richard Purdie
@ 2019-04-02 22:27   ` Peter Kjellerstedt
  2019-04-03  6:22   ` Adrian Bunk
  1 sibling, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 22:27 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core

> -----Original Message-----
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Sent: den 2 april 2019 22:27
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; openembedded-
> core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 0/6] Correct and improve the ARM tunings
> 
> On Tue, 2019-04-02 at 21:30 +0200, Peter Kjellerstedt wrote:
> > 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.
> 
> It depends how you view TUNE_FEATURES and 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.

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

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

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

> Cheers,
> 
> Richard

//Peter


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

* Re: [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches"
  2019-04-02 20:52   ` akuster808
@ 2019-04-02 22:29     ` Peter Kjellerstedt
  0 siblings, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-02 22:29 UTC (permalink / raw)
  To: akuster808, openembedded-core

This revert (and the following) are there to allow my alternative 
solution to be applied.

//Peter

> -----Original Message-----
> From: akuster808 <akuster808@gmail.com>
> Sent: den 2 april 2019 22:53
> To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; openembedded-
> core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check
> for dsp only to enable 'e' in package arches"
> 
> Peter
> 
> On 4/2/19 12:31 PM, Peter Kjellerstedt wrote:
> > 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
> >
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > ---
> >  meta/conf/machine/include/arm/arch-armv5-dsp.inc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/conf/machine/include/arm/arch-armv5-dsp.inc
> b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
> > index d117af1520..1f16085fcd 100644
> > --- a/meta/conf/machine/include/arm/arch-armv5-dsp.inc
> > +++ b/meta/conf/machine/include/arm/arch-armv5-dsp.inc
> > @@ -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


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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-02 20:26 ` [PATCH 0/6] Correct and improve the ARM tunings Richard Purdie
  2019-04-02 22:27   ` Peter Kjellerstedt
@ 2019-04-03  6:22   ` Adrian Bunk
  2019-04-03 19:29     ` Andre McCurdy
  1 sibling, 1 reply; 18+ messages in thread
From: Adrian Bunk @ 2019-04-03  6:22 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Peter Kjellerstedt, openembedded-core

On Tue, Apr 02, 2019 at 09:26:46PM +0100, Richard Purdie wrote:
>...
> "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.

> 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



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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-03  6:22   ` Adrian Bunk
@ 2019-04-03 19:29     ` Andre McCurdy
  2019-04-03 20:24       ` Adrian Bunk
  0 siblings, 1 reply; 18+ messages in thread
From: Andre McCurdy @ 2019-04-03 19:29 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Peter Kjellerstedt, OE Core mailing list

On Tue, Apr 2, 2019 at 11:23 PM Adrian Bunk <bunk@stusta.de> wrote:
> On Tue, Apr 02, 2019 at 09:26:46PM +0100, Richard Purdie wrote:
> >...
> > "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.

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

> 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.
>
> > 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
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-03 19:29     ` Andre McCurdy
@ 2019-04-03 20:24       ` Adrian Bunk
  2019-04-03 20:48         ` Andre McCurdy
  0 siblings, 1 reply; 18+ messages in thread
From: Adrian Bunk @ 2019-04-03 20:24 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Peter Kjellerstedt, OE Core mailing list

On Wed, Apr 03, 2019 at 12:29:29PM -0700, Andre McCurdy wrote:
> On Tue, Apr 2, 2019 at 11:23 PM Adrian Bunk <bunk@stusta.de> wrote:
> > On Tue, Apr 02, 2019 at 09:26:46PM +0100, Richard Purdie wrote:
> > >...
> > > "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.
> 
> 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).

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.


-- 

       "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



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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-03 20:24       ` Adrian Bunk
@ 2019-04-03 20:48         ` Andre McCurdy
  2019-04-04  8:00           ` Adrian Bunk
  2019-04-17  8:33           ` Martin Jansa
  0 siblings, 2 replies; 18+ messages in thread
From: Andre McCurdy @ 2019-04-03 20:48 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Peter Kjellerstedt, OE Core mailing list

On Wed, Apr 3, 2019 at 1:24 PM Adrian Bunk <bunk@stusta.de> wrote:
> On Wed, Apr 03, 2019 at 12:29:29PM -0700, Andre McCurdy wrote:
> > On Tue, Apr 2, 2019 at 11:23 PM Adrian Bunk <bunk@stusta.de> wrote:
> > > On Tue, Apr 02, 2019 at 09:26:46PM +0100, Richard Purdie wrote:
> > > >...
> > > > "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.
> >
> > 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).
>
> 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?

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

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


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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-03 20:48         ` Andre McCurdy
@ 2019-04-04  8:00           ` Adrian Bunk
  2019-04-17  8:33           ` Martin Jansa
  1 sibling, 0 replies; 18+ messages in thread
From: Adrian Bunk @ 2019-04-04  8:00 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Peter Kjellerstedt, OE Core mailing list

On Wed, Apr 03, 2019 at 01:48:04PM -0700, Andre McCurdy wrote:
>...
> 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.

> 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

-- 

       "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



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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-03 20:48         ` Andre McCurdy
  2019-04-04  8:00           ` Adrian Bunk
@ 2019-04-17  8:33           ` Martin Jansa
  2019-04-17 10:26             ` Peter Kjellerstedt
  1 sibling, 1 reply; 18+ messages in thread
From: Martin Jansa @ 2019-04-17  8:33 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: OE Core mailing list, Peter Kjellerstedt, Adrian Bunk

[-- Attachment #1: Type: text/plain, Size: 6922 bytes --]

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)}"
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 :/.

On Wed, Apr 3, 2019 at 10:48 PM Andre McCurdy <armccurdy@gmail.com> wrote:

> On Wed, Apr 3, 2019 at 1:24 PM Adrian Bunk <bunk@stusta.de> wrote:
> > On Wed, Apr 03, 2019 at 12:29:29PM -0700, Andre McCurdy wrote:
> > > On Tue, Apr 2, 2019 at 11:23 PM Adrian Bunk <bunk@stusta.de> wrote:
> > > > On Tue, Apr 02, 2019 at 09:26:46PM +0100, Richard Purdie wrote:
> > > > >...
> > > > > "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.
> > >
> > > 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).
> >
> > 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?
>
> 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...
>
> > 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
> >
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 9391 bytes --]

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

* Re: [PATCH 0/6] Correct and improve the ARM tunings
  2019-04-17  8:33           ` Martin Jansa
@ 2019-04-17 10:26             ` Peter Kjellerstedt
  0 siblings, 0 replies; 18+ messages in thread
From: Peter Kjellerstedt @ 2019-04-17 10:26 UTC (permalink / raw)
  To: Martin Jansa, Andre McCurdy; +Cc: OE Core mailing list, Adrian Bunk

[-- Attachment #1: Type: text/plain, Size: 8056 bytes --]

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 <martin.jansa@gmail.com>
Sent: den 17 april 2019 10:33
To: Andre McCurdy <armccurdy@gmail.com>
Cc: Adrian Bunk <bunk@stusta.de>; Peter Kjellerstedt <peter.kjellerstedt@axis.com>; OE Core mailing list <openembedded-core@lists.openembedded.org>
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:$%7b@bb.utils.contains('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:$%7b@bb.utils.contains('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 <armccurdy@gmail.com<mailto:armccurdy@gmail.com>> wrote:
On Wed, Apr 3, 2019 at 1:24 PM Adrian Bunk <bunk@stusta.de<mailto:bunk@stusta.de>> wrote:
> On Wed, Apr 03, 2019 at 12:29:29PM -0700, Andre McCurdy wrote:
> > On Tue, Apr 2, 2019 at 11:23 PM Adrian Bunk <bunk@stusta.de<mailto:bunk@stusta.de>> wrote:
> > > On Tue, Apr 02, 2019 at 09:26:46PM +0100, Richard Purdie wrote:
> > > >...
> > > > "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.
> >
> > 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).
>
> 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?

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

> 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
>
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org>
http://lists.openembedded.org/mailman/listinfo/openembedded-core

[-- Attachment #2: Type: text/html, Size: 15750 bytes --]

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

end of thread, other threads:[~2019-04-17 10:26 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 19:30 [PATCH 0/6] Correct and improve the ARM tunings Peter Kjellerstedt
2019-04-02 19:30 ` [PATCH 1/6] arch-armv8a.inc: Correct PACKAGE_EXTRA_ARCHS_tune-armv8a-* Peter Kjellerstedt
2019-04-02 19:31 ` [PATCH 2/6] Revert "arch-armv5-dsp.inc: Check for dsp only to enable 'e' in package arches" Peter Kjellerstedt
2019-04-02 20:52   ` akuster808
2019-04-02 22:29     ` Peter Kjellerstedt
2019-04-02 19:31 ` [PATCH 3/6] Revert "arm-tunes: Remove -march option if mcpu is already added" Peter Kjellerstedt
2019-04-02 19:31 ` [PATCH 4/6] arm-tunes: Prefer the -mcpu option over -march Peter Kjellerstedt
2019-04-02 19:31 ` [PATCH 5/6] arch-arm64.inc: Lower the priority of aarch64 in MACHINEOVERRIDES Peter Kjellerstedt
2019-04-02 19:31 ` [PATCH 6/6] arm-tunes: Add armv8a to TUNE_FEATURES as appropriate Peter Kjellerstedt
2019-04-02 20:26 ` [PATCH 0/6] Correct and improve the ARM tunings Richard Purdie
2019-04-02 22:27   ` Peter Kjellerstedt
2019-04-03  6:22   ` Adrian Bunk
2019-04-03 19:29     ` Andre McCurdy
2019-04-03 20:24       ` Adrian Bunk
2019-04-03 20:48         ` Andre McCurdy
2019-04-04  8:00           ` Adrian Bunk
2019-04-17  8:33           ` Martin Jansa
2019-04-17 10:26             ` Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.