Replace -mno-thumb by -marm
PATCH 1/1 Change -mno-thumb to -marm
In reply to Ken WernerRecent versions of the GCC reject the -mno-thumb option. In order to prevent the compiler from generating code for the Thumb instruction set the -marm switch should be used instead. For details see GNU bug #47930.
--- .../conf/machine/include/arm/feature-arm-thumb.inc | 4 ++-- meta/conf/machine/include/tune-thumb.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
meta/conf/machine/include/arm/feature-arm-thumb.inc +2 -2
@@ -5,7 +5,7 @@ # but requires more instructions (140% for 70% smaller code) so may be # slower. TUNEVALID[thumb] = "Use thumb instructions instead of ARM" -ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}" +ARM_THUMB_M_OPT = "${@['-marm', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "thumb", "${ARM_THUMB_M_OPT}", "", d)}" OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "thumb", ":thumb", "", d)}"
@@ -23,4 +23,4 @@ TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions" TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "no-thumb-interwork", "-mno-thumb-interwork", "-mthumb-interwork", d)}" OVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "no-thumb-interwork", ":thumb-interwork", "", d)}" -TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" +TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm"
meta/conf/machine/include/tune-thumb.inc +2 -2
@@ -24,9 +24,9 @@ OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" # options ensure that the compiler has the correct settings for the selected # instruction set and interworking. ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][d.getVar('THUMB_INTERWORK', 1) == 'yes']}" -ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}" +ARM_THUMB_M_OPT = "${@['-marm', '-mthumb'][d.getVar('ARM_INSTRUCTION_SET', 1) == 'thumb']}" # TUNE_CCARGS += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" -TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" +TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm"
Signature · 1 line
1.7.5.4
PATCH 1/1 Replace -mno-thumb by -marm
Hi,
The OE-Core qemuarm MACHINE configuration uses "-march=armv5te -mno-thumb" in order to generate code for the ARM instruction set. Recent versions of GCC for ARM reject the -mno-thumb option [*] and expects developers to use the -marm instead. Since -marm also works for older GCC versions I just replaced -mno-thumb by -marm.
Since OE-Core is using a GCC 4.6.3 based toolchain this isn't an issue yet. But it causes some trouble for users who build OE-Core with a recent external toolchain (depending on the ARM_INSTRUCTION_SET).
Ken Werner (1):
Change -mno-thumb to -marm
.../conf/machine/include/arm/feature-arm-thumb.inc | 4 ++-- meta/conf/machine/include/tune-thumb.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
Regards,
Ken
[*] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47930
Signature · 1 line
1.7.5.4