arch-armv4.inc: add --fix-v4bx to TARGET_LD_KERNEL_ARCH only for armv4 and strongarm1100
RFC PATCH 1/1 arch-armv4.inc: add --fix-v4bx to TARGET_LD_KERNEL_ARCH only for armv4 and strongarm1100
* without this patch it does apply --fix-v4bx not only to armv4, but also all higher (because they also have armv4 in TUNE_FEATURES)
* it causes SIGILL on armv4t
http://lists.linuxtogo.org/pipermail/openembedded-devel/2012-November/042298.html
* someone please test on armv4 device (I tested only bitbake -e output that it's correctly applied with DEFAULTTUNE == armv4
* maybe we can should fix this in binutils instead (both 2.22 and 2.23 are affected)
--- meta/conf/machine/include/arm/arch-armv4.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-)
meta/conf/machine/include/arm/arch-armv4.inc +1 -1
@@ -4,7 +4,7 @@ ARMPKGARCH ?= "armv4" TUNEVALID[armv4] = "Enable instructions for ARMv4" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv4", "-march=armv4${ARMPKGSFX_THUMB}", "", d)}" -TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("TUNE_FEATURES", "armv4", "--fix-v4bx", "", d)}" +TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("DEFAULTTUNE", "armv4", "--fix-v4bx", "", d)}" MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "armv4", ":armv4", "" ,d)}" require conf/machine/include/arm/arch-arm.inc
meta/conf/machine/include/tune-strongarm1100.inc +1 -2
@@ -8,5 +8,4 @@ TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "strongarm", "-mtune=stron AVAILTUNES += "strongarm" TUNE_FEATURES_tune-strongarm = "${TUNE_FEATURES_tune-armv4} strongarm" PACKAGE_EXTRA_ARCHS_tune-strongarm = "${PACKAGE_EXTRA_ARCHS_tune-armv4}" - - +TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("DEFAULTTUNE", "strongarm", "--fix-v4bx", "", d)}"
Signature · 1 line
1.8.0
meta/conf/machine/include/arm/arch-armv4.inc ARMPKGARCH ?= "armv4" · line 7
Quoted 2 lines · Martin Jansa
meta/conf/machine/include/arm/arch-armv4.inc +1
-1-TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("TUNE_FEATURES", "armv4", "--fix-v4bx", "", d)}" +TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("DEFAULTTUNE", "armv4", "--fix-v4bx", "", d)}"
Testing DEFAULTTUNE doesn't really seem like the right thing. Not that I am any expert in the twisty maze of tune variables, but I would have thought this should be:
TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "", "--fix-v4bx", d)}"
Or maybe it could just be fixed in the kernel, since its own build system already knows whether Thumb is available or not.
p.
Quoted 9 lines · Phil Blundell
meta/conf/machine/include/arm/arch-armv4.inc ARMPKGARCH ?= "armv4" · line 7
Quoted 2 lines · Martin Jansa
meta/conf/machine/include/arm/arch-armv4.inc +1
-1-TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("TUNE_FEATURES", "armv4", "--fix-v4bx", "", d)}" +TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("DEFAULTTUNE", "armv4", "--fix-v4bx", "", d)}"Testing DEFAULTTUNE doesn't really seem like the right thing. Not that I am any expert in the twisty maze of tune variables, but I would have thought this should be:
TARGET_LD_KERNEL_ARCH+= "${@bb.utils.contains("TUNE_FEATURES", "thumb", "", "--fix-v4bx", d)}"
Depends if we want to apply it on e.g. armv5te device without thumb in TUNE_FEATURES.
Quoted 2 lines
Or maybe it could just be fixed in the kernel, since its own build system already knows whether Thumb is available or not.
True, but then we need to fix every kernel recipe and because it took me quite long time to find commit which caused it, I fear that it will reappear in future when some layer adds kernel recipe without such fix.
Cheers,
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 9 lines · Martin Jansa
Quoted 8 lines · Phil Blundell
meta/conf/machine/include/arm/arch-armv4.inc ARMPKGARCH ?= "armv4" · line 7
Quoted 2 lines · Martin Jansa
meta/conf/machine/include/arm/arch-armv4.inc +1
-1-TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("TUNE_FEATURES", "armv4", "--fix-v4bx", "", d)}" +TARGET_LD_KERNEL_ARCH += "${@bb.utils.contains("DEFAULTTUNE", "armv4", "--fix-v4bx", "", d)}"Testing DEFAULTTUNE doesn't really seem like the right thing. Not that I am any expert in the twisty maze of tune variables, but I would have thought this should be:
Quoted 4 lines
Quoted 1 line
TARGET_LD_KERNEL_ARCH+= "${@bb.utils.contains("TUNE_FEATURES", "thumb", "", "--fix-v4bx", d)}"Depends if we want to apply it on e.g. armv5te device without thumb in
TUNE_FEATURES.
Oh, yes, right. Well, if you aren't using thumb then --fix-v4bx is going to be mostly harmless, but I suppose the correct thing would be to check for TUNE_FEATURES containing neither thumb nor armv5.
p.