feature-arm-thumb.inc cleanups
cover feature-arm-thumb.inc cleanups
Drop legacy interworking over-rides and cflags.
Andre McCurdy (3):
feature-arm-thumb.inc: drop ARM -vs- thumb comments feature-arm-thumb.inc: drop legacy _thumb and _thumb-interwork over-rides feature-arm-thumb.inc: drop 'no-thumb-interwork' tuning feature
meta/conf/machine/include/arm/feature-arm-thumb.inc | 17 ----------------- 1 file changed, 17 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 feature-arm-thumb.inc: drop ARM -vs- thumb comments
Comments are old and specific to thumb1. Since oe-core CPU tuning files aren't really the right place to fully document ARM -vs- thumb, drop the comments instead of trying to update them.
--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 6 ------ 1 file changed, 6 deletions(-)
meta/conf/machine/include/arm/feature-arm-thumb.inc +0 -6
@@ -1,9 +1,3 @@ -# The instruction set the compiler should use when generating application -# code. The kernel is always compiled with arm code at present. arm code -# is the original 32 bit ARM instruction set, thumb code is the 16 bit -# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) -# but requires more instructions (140% for 70% smaller code) so may be -# slower. TUNEVALID[thumb] = "Use thumb instructions instead of ARM" ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET', True) == 'thumb']}" ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', 't', '', d)}"
Signature · 1 line
1.9.1
PATCH 2/3 feature-arm-thumb.inc: drop legacy _thumb and _thumb-interwork over-rides
In reply to Andre McCurdyBitbake over-rides for _thumb and _thumb-interwork are undocumented and are not used anywhere in oe-core or meta-oe. The logic setting up the thumb-interwork over-ride even seems to be reversed and nobody noticed, so it seems safe to assume that these over-rides are not used.
--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 3 --- 1 file changed, 3 deletions(-)
meta/conf/machine/include/arm/feature-arm-thumb.inc +0 -3
@@ -24,7 +24,6 @@ python () { } TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}" -OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}" # Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}"
@@ -35,9 +34,7 @@ ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_ # turn this off - the actual cost is very small. TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions" THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}" -THUMB_OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}" TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}" -OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${THUMB_OVERRIDES}', '', d)}" # what about armv7m devices which don't support -marm (e.g. Cortex-M3)? TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
Signature · 1 line
1.9.1
PATCH 3/3 feature-arm-thumb.inc: drop 'no-thumb-interwork' tuning feature
In reply to Andre McCurdyInterworking is required for ARM EABI, so attempting to disable it via a tuning feature no longer makes sense (support for ARM OABI was deprecated in gcc 4.7). We can drop '-mthumb-interwork' from TUNE_CCARGS for the same reason.
--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 8 -------- 1 file changed, 8 deletions(-)
meta/conf/machine/include/arm/feature-arm-thumb.inc +0 -8
@@ -28,13 +28,5 @@ TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}' # Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}" -# Whether to compile with code to allow interworking between the two -# instruction sets. This allows thumb code to be executed on a primarily -# arm system and vice versa. It is strongly recommended that DISTROs not -# turn this off - the actual cost is very small. -TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions" -THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}" - # what about armv7m devices which don't support -marm (e.g. Cortex-M3)? TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
Signature · 1 line
1.9.1
Quoted 1 line · Andre McCurdy
Drop legacy interworking over-rides and cflags.
Ping. Does anyone see any issues with these changes?
Quoted 11 lines
Andre McCurdy (3):
feature-arm-thumb.inc: drop ARM -vs- thumb comments feature-arm-thumb.inc: drop legacy_thumband _thumb-interwork over-rides feature-arm-thumb.inc: drop 'no-thumb-interwork' tuning featuremeta/conf/machine/include/arm/feature-arm-thumb.inc | 17 ----------------- 1 file changed, 17 deletions(-)--
1.9.1
Quoted 2 lines · Andre McCurdy
Ping. Does anyone see any issues with these changes?
Manage to mix those up with your more recent ARM fixes, both merged to my staging branch now.
Thanks,
Ross