feature-arm-thumb.inc: Do not tie generating thumb ISA to -march
PATCH 1/1 feature-arm-thumb.inc: Do not tie generating thumb ISA to -march
-march=armv5't'e means that CPU can execute thumb ISA, we do not need to tie this to exclusively generating thumb ISA, this change means that when we have thumb in tune features then it can use 't' in -march options irrespective of ISA being thumb or arm.
This fixes derivative of armv5 tunes and paves way for gcc9 where e.g. armv5e is dropped and minimum arch supported is armv5te
--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/machine/include/arm/feature-arm-thumb.inc +1 -1
@@ -24,7 +24,7 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', 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') == 'thumb' else ''}" +ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', 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
2.20.1
I think this will include it not only in -march parameter but also in TUNE_PKGARCH.
So the packages built with and without thumb ISA will have the same file name and package feed which is wrong.
It should probably be fixed only when adding march to TUNE_CCARGS:
meta/conf/machine/include/arm/arch-armv4.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4${ARMPKGSFX_THUMB}', '', d)}" meta/conf/machine/include/arm/arch-armv5.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}', '', d)}" meta/conf/machine/include/arm/arch-armv6.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', ' -march=armv6', '', d)}" meta/conf/machine/include/arm/arch-armv7a.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', ' -march=armv7-a', '', d)}" meta/conf/machine/include/arm/arch-armv7ve.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', ' -march=armv7ve', '', d)}"
Quoted 41 lines · Khem Raj
-march=armv5't'e means that CPU can execute thumb ISA, we do not need to tie this to exclusively generating thumb ISA, this change means that when we have thumb in tune features then it can use 't' in -march options irrespective of ISA being thumb or arm.
This fixes derivative of armv5 tunes and paves way for gcc9 where e.g. armv5e is dropped and minimum arch supported is armv5te
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/conf/machine/include/arm/feature-arm-thumb.inc +0
-1@@ -24,7 +24,7 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}" # Add suffix from ARM_THUMB_SUFFIX only if after all this we still set
ARM_M_OPTto thumb
-ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d) ifd.getVar('ARM_M_OPT')== 'thumb' else ''}" +ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', 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)}" -- 2.20.1--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 4 lines · Martin Jansa
I think this will include it not only in -march parameter but also in
TUNE_PKGARCH.
So the packages built with and without thumb ISA will have the same file name and package feed which is wrong.
I did ponder over it before following the approach I took, but I think you have to point to maintain separate feeds for thumb and arm ISA generated packages.
I think since we do not support OABI and EABI demands interwork, so using 't' unconditionally in -march is a workable approach too.
Quoted 44 lines
It should probably be fixed only when adding march to
TUNE_CCARGS:
meta/conf/machine/include/arm/arch-armv4.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4${ARMPKGSFX_THUMB}', '', d)}" meta/conf/machine/include/arm/arch-armv5.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}', '', d)}" meta/conf/machine/include/arm/arch-armv6.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', ' -march=armv6', '', d)}" meta/conf/machine/include/arm/arch-armv7a.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', ' -march=armv7-a', '', d)}" meta/conf/machine/include/arm/arch-armv7ve.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', ' -march=armv7ve', '', d)}"Quoted 35 lines · Khem Raj
-march=armv5't'e means that CPU can execute thumb ISA, we do not need to tie this to exclusively generating thumb ISA, this change means that when we have thumb in tune features then it can use 't' in -march options irrespective of ISA being thumb or arm.
This fixes derivative of armv5 tunes and paves way for gcc9 where e.g. armv5e is dropped and minimum arch supported is armv5te
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/conf/machine/include/arm/feature-arm-thumb.inc +1
-2@@ -24,7 +24,7 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', 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') == 'thumb' else ''}" +ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', 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)}" --2.20.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
sent a v2 which i am testing
Quoted 57 lines · Khem Raj
Quoted 4 lines · Martin Jansa
I think this will include it not only in -march parameter but also in
TUNE_PKGARCH.
So the packages built with and without thumb ISA will have the same file name and package feed which is wrong.I did ponder over it before following the approach I took, but I think you have to point to maintain separate feeds for thumb and arm ISA generated packages.
I think since we do not support OABI and EABI demands interwork, so using 't' unconditionally in -march is a workable approach too.Quoted 44 lines
It should probably be fixed only when adding march to
TUNE_CCARGS:
meta/conf/machine/include/arm/arch-armv4.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4${ARMPKGSFX_THUMB}', '', d)}" meta/conf/machine/include/arm/arch-armv5.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}', '', d)}" meta/conf/machine/include/arm/arch-armv6.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', ' -march=armv6', '', d)}" meta/conf/machine/include/arm/arch-armv7a.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', ' -march=armv7-a', '', d)}" meta/conf/machine/include/arm/arch-armv7ve.inc:TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', ' -march=armv7ve', '', d)}"Quoted 35 lines · Khem Raj
-march=armv5't'e means that CPU can execute thumb ISA, we do not need to tie this to exclusively generating thumb ISA, this change means that when we have thumb in tune features then it can use 't' in -march options irrespective of ISA being thumb or arm.
This fixes derivative of armv5 tunes and paves way for gcc9 where e.g. armv5e is dropped and minimum arch supported is armv5te
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/conf/machine/include/arm/feature-arm-thumb.inc +1
-2@@ -24,7 +24,7 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', 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') == 'thumb' else ''}" +ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', 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)}" --2.20.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core