package/binutils: Cortex-M targets require version <2.29
PATCH 1/1 package/binutils: Cortex-M targets require version <2.29
binutils 2.29 changed the implementation of adr pseudo instruction it breaks linux kernel and impacts Cortex-M targets (eg. stm32)
--- package/binutils/Config.in.host | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
package/binutils/Config.in.host +3 -2
@@ -2,8 +2,9 @@ comment "Binutils Options" choice prompt "Binutils Version" - default BR2_BINUTILS_VERSION_2_29_X if !BR2_arc - default BR2_BINUTILS_VERSION_ARC if BR2_arc + default BR2_BINUTILS_VERSION_2_28_X if BR2_ARM_CPU_ARMV7M + default BR2_BINUTILS_VERSION_2_29_X if !BR2_arc && !BR2_ARM_CPU_ARMV7M + default BR2_BINUTILS_VERSION_ARC if BR2_arc && !BR2_ARM_CPU_ARMV7M help Select the version of binutils you wish to use.
Signature · 1 line
2.11.0
PATCH 1/1 package/binutils: Cortex-M targets require version <2.29
Hello Laurent,
Thanks for this bug report and patch!
Quoted 2 lines · Laurent GONZALEZ
binutils 2.29 changed the implementation of adr pseudo instruction it breaks linux kernel and impacts Cortex-M targets (eg. stm32)
Do you have a reference for this issue ? I assume it is going to be fixed at some point, because it is not possible to stay forever with older binutils version, right ? Is there a binutils bug filled in for this problem ?
package/binutils/Config.in.host comment "Binutils Options" · line 7
Quoted 7 lines
choice
package/binutils/Config.in.host +3
-2prompt "Binutils Version" - default BR2_BINUTILS_VERSION_2_29_X if !BR2_arc - default BR2_BINUTILS_VERSION_ARC if BR2_arc + default BR2_BINUTILS_VERSION_2_28_X if BR2_ARM_CPU_ARMV7M + default BR2_BINUTILS_VERSION_2_29_X if !BR2_arc && !BR2_ARM_CPU_ARMV7M + default BR2_BINUTILS_VERSION_ARC if BR2_arc && !BR2_ARM_CPU_ARMV7M
This solution only ensures that the default is not binutils 2.29, but it does not prevent the user from choosing 2.29 for a Cortex-M target. Instead, we would need to add some "depends on !BR2_ARM_CPU_ARMV7M" on the binutils 2.29 option. However, I'd like to first understand better the issue, and see if there is already a patch in upstream binutils to fix it.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/binutils: Cortex-M targets require version <2.29
Quoted 1 line · Thomas Petazzoni
Hello Laurent, > > Thanks for this bug report and patch! > > On Mon, 16 Apr 2018 14:21:18 +0200, Laurent GONZALEZ wrote: >> binutils 2.29 changed the implementation of adr pseudo instruction >> it breaks linux kernel and impacts Cortex-M targets (eg. stm32) > > Do you have a reference for this issue ? I assume it is going to be > fixed at some point, because it is not possible to stay forever with > older binutils version, right ? Is there a binutils bug filled in for > this problem ? Unfortunately, I think binutils will not change. The new adr behavior
broke linux kernel, ffmpeg and ssl. Nowadays, only linux kernel has not been fixed. We can either avoid bintutils <2.29 or patch the kernel.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
choice prompt "Binutils Version" - default >>
BR2_BINUTILS_VERSION_2_29_Xif !BR2_arc - default >>BR2_BINUTILS_VERSION_ARCifBR2_arc+ default >>BR2_BINUTILS_VERSION_2_28_XifBR2_ARM_CPU_ARMV7M+ default >>BR2_BINUTILS_VERSION_2_29_Xif !BR2_arc && !BR2_ARM_CPU_ARMV7M + >> defaultBR2_BINUTILS_VERSION_ARCifBR2_arc&& !BR2_ARM_CPU_ARMV7M > > This solution only ensures that the default is not binutils 2.29, > but it does not prevent the user from choosing 2.29 for a Cortex-M > target. Instead, we would need to add some "depends on > !BR2_ARM_CPU_ARMV7M" on the binutils 2.29 option. Good catch, i'll submit a new patch asap.
--
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180417/3c2b91dd/attachment.html>
PATCH 1/1 package/binutils: Cortex-M targets require version <2.29
Hello Laurent,
Could you ask Thunderbird to not send a HTML version of your e-mails when sending to this mailing list?
Quoted 4 lines · Laurent GONZALEZ
Unfortunately, I think binutils will not change. The new adr behavior broke linux kernel, ffmpeg and ssl. Nowadays, only linux kernel has not been fixed. We can either avoid bintutils <2.29 or patch the kernel.
Do you have some pointers/references about this issue ?
Quoted 1 line
Good catch, i'll submit a new patch asap.
Well, as I said, I'm not really convinced by a solution that consists in excluding binutils 2.29 and binutils 2.30 for ARMv7-M. Indeed, once binutils 2.31 is released, we will make binutils 2.30 the default version, and remove support for binutils 2.28.
Hence the proper solution is to move forward and fix the kernel problem, rather than force the use of older binutils.
Best regards,
Thomas Petazzoni
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/1 package/binutils: Cortex-M targets require version <2.29
Quoted 1 line · Thomas Petazzoni
On Tue, 17 Apr 2018 09:04:39 +0200, Laurent GONZALEZ wrote: > >> Unfortunately, I think binutils will not change. The new adr >> behavior broke linux kernel, ffmpeg and ssl. Nowadays, only linux >> kernel has not been fixed. We can either avoid bintutils <2.29 or >> patch the kernel. > > Do you have some pointers/references about this issue ? This lkml message is probably the most interresting one in the thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/543467.html
Quoted 1 line
Well, as I said, I'm not really convinced by a solution that > consists in excluding binutils 2.29 and binutils 2.30 for ARMv7-M. > Indeed, once binutils 2.31 is released, we will make binutils 2.30 > the default version, and remove support for binutils 2.28. > > Hence the proper solution is to move forward and fix the kernel > problem, rather than force the use of older binutils. What about:
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-March/565390.html
--
Laurent
PATCH 1/1 package/binutils: Cortex-M targets require version <2.29
In reply to Thomas PetazzoniI resend my previous mail for clarity.
Quoted 4 lines · Thomas Petazzoni
Hello Laurent,
Could you ask Thunderbird to not send a HTML version of your e-mails when sending to this mailing list?
Thunderbird does so many things on my behalf !
Quoted 7 lines · Laurent GONZALEZ
Quoted 5 lines
Unfortunately, I think binutils will not change. The new adr behavior broke linux kernel, ffmpeg and ssl. Nowadays, only linux kernel has not been fixed. We can either avoid bintutils <2.29 or patch the kernel.
Do you have some pointers/references about this issue ?
This lkml message is probably the most interresting one in the thread:
http://lists.infradead.org/pipermail/linux-arm-kernel/2017-November/543467.html
Quoted 8 lines
Quoted 1 line
Good catch, i'll submit a new patch asap.
Well, as I said, I'm not really convinced by a solution that consists in excluding binutils 2.29 and binutils 2.30 for ARMv7-M. Indeed, once binutils 2.31 is released, we will make binutils 2.30 the default version, and remove support for binutils 2.28.
Hence the proper solution is to move forward and fix the kernel problem, rather than force the use of older binutils.
What about:
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-March/565390.html
--
Laurent