diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2015-10-19 19:59:21 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-07 13:40:19 +0000 |
commit | e9b2ffc0feeefdd03115f1e9495e9be48ee749b2 (patch) | |
tree | f76ca527a8f17f180f3172cfdea7216d4025d352 /meta/conf/machine/include/arm/feature-arm-vfp.inc | |
parent | 45f726cc58007afe21db738c5a58f0cfff04a323 (diff) | |
download | poky-e9b2ffc0feeefdd03115f1e9495e9be48ee749b2.tar.gz |
feature-arm-{neon,vfp}.inc: refactor and fix issues
* respect all 4 vfp options ('vfp', 'vfpv3d16', 'vfpv3', 'vfpv4') when
setting -mfloat-abi and ARMPKGSFX_EABI, without this change it wasn't
possible to use call-convention hard together with vfpv4
* move 'vfpv3d16', 'vfpv3', 'vfpv4' support from
feature-arm-vfp.inc
to
feature-arm-neon.inc
the main difference is that feature-arm-vfp.inc is included in
arch-armv5.inc while feature-arm-neon.inc only in armv7*.inc, so
these options should be added to TUNEVALID also only for armv7*
MACHINEs.
* support vfpv4 with or without neon
when both vfpv4 and neon are in TUNE_FEATURES we want to set only one
-mfpu parameter and to neon-vfpv4
* prevent multiple appends to ARMPKGSFX_FPU, we don't want to include
e.g. -vfp as well as -vfpv4 when both "vfp" and "vfpv4" are in
TUNE_FEATURES
* add -mfpu=vfp for tunes with "vfp" in TUNE_FEATURES - before that we
were only adding -vfp to ARMPKGSFX_FPU
* add TUNE_CCARGS_MFPU variable which is used to set -mfpu parameter as
well as ARMPKGSFX_FPU suffix in TUNE_PKGARCH, all enabled values are
appended to it based on TUNE_FEATURES and then the last one is used
in the actual param and suffix
* this prevents multiple -mfpu options in TUNE_CCARGS
* !!!
This means we need to change TUNE_PKGARCH and PACKAGE_EXTRA_ARCHS for
vfpv4, vfpv3d16, vfpv3 tunes, because the -vfp* isn't prependend
multiple times. If you're using one of these new DEFAULTTUNES (which
were at least partially broken anyway) and depend on working binary
package feed upgrade-path, then don't forget to migrate PR service
database to new TUNE_PKGARCH.
(From OE-Core rev: 6661718158f8fdcdf63b0d48e8fe72d3ac4778f2)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/conf/machine/include/arm/feature-arm-vfp.inc')
-rw-r--r-- | meta/conf/machine/include/arm/feature-arm-vfp.inc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/meta/conf/machine/include/arm/feature-arm-vfp.inc b/meta/conf/machine/include/arm/feature-arm-vfp.inc index e23d377252..1b394886dd 100644 --- a/meta/conf/machine/include/arm/feature-arm-vfp.inc +++ b/meta/conf/machine/include/arm/feature-arm-vfp.inc | |||
@@ -1,17 +1,13 @@ | |||
1 | TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit." | 1 | # This is only for VFPv1 or VFPv2, other vfp* tunes are defined in |
2 | ARMPKGSFX_FPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', '-vfp', '' ,d)}" | 2 | # feature-arm-neon.inc, because they are available only for armv7* |
3 | 3 | # and this .inc file is included from armv5 | |
4 | TUNEVALID[vfpv3d16] = "Enable Vector Floating Point Version 3 with 16 registers (vfpv3-d16) unit." | ||
5 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', ' -mfpu=vfpv3-d16', '', d)}" | ||
6 | ARMPKGSFX_FPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', '-vfpv3d16', '' ,d)}" | ||
7 | 4 | ||
8 | TUNEVALID[vfpv3] = "Enable Vector Floating Point Version 3 with 32 registers (vfpv3) unit." | 5 | TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit." |
9 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3', ' -mfpu=vfpv3', '', d)}" | 6 | TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}" |
10 | ARMPKGSFX_FPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3', '-vfpv3', '' ,d)}" | ||
11 | 7 | ||
12 | TUNEVALID[vfpv4] = "Enable Vector Floating Point Version 4 (vfpv4) unit." | 8 | TUNE_CCARGS .= "${@ (' -mfpu=%s ' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}" |
13 | ARMPKGSFX_FPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv4', '-vfpv4', '' ,d)}" | 9 | ARMPKGSFX_FPU = "${@ ('-%s' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}" |
14 | 10 | ||
15 | TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP." | 11 | TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP." |
16 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', ' -mfloat-abi=hard', ' -mfloat-abi=softfp', d), '' ,d)}" | 12 | TUNE_CCARGS .= "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', ' -mfloat-abi=hard', ' -mfloat-abi=softfp', d) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else '' }" |
17 | ARMPKGSFX_EABI .= "${@bb.utils.contains('TUNE_FEATURES', [ 'callconvention-hard', 'vfp' ], 'hf', '', d)}" | 13 | ARMPKGSFX_EABI = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hf', '', d) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else '' }" |