Introduce MORTSGNA_ARMV7_TUNE to reduce armv7a build variant optionally

It depends on user's needs - and is not a pinned distro decision.

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
Andreas Müller
2018-10-26 11:38:56 +02:00
parent 834950ff2e
commit a1c2700c09
4 changed files with 40 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
def armv7_tune_handler(d):
tune = d.getVar('DEFAULTTUNE', True)
# set MORTSGNA_ARMV7_TUNE="1" in your local.conf to reduce all cortex variants
# to common tune value
if d.getVar('MORTSGNA_ARMV7_TUNE', True) == '1':
features = d.getVar('TUNE_FEATURES', True).split()
if 'armv7a' in features or 'armv7ve' in features:
tune = 'armv7athf'
if 'bigendian' in features:
tune += 'b'
if 'neon' in features:
tune += '-neon'
else:
tune = d.getVar('DEFAULTTUNE', True)
return tune