All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29
@ 2018-04-16 12:21 Laurent GONZALEZ
  2018-04-17  6:49 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent GONZALEZ @ 2018-04-16 12:21 UTC (permalink / raw)
  To: buildroot

binutils 2.29 changed the implementation of adr pseudo instruction
it breaks linux kernel and impacts Cortex-M targets (eg. stm32)

Signed-off-by: Laurent GONZALEZ <br22@gezedo.com>
---
 package/binutils/Config.in.host | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host
index 22478d917a..ef957777ee 100644
--- a/package/binutils/Config.in.host
+++ b/package/binutils/Config.in.host
@@ -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.
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29
  2018-04-16 12:21 [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29 Laurent GONZALEZ
@ 2018-04-17  6:49 ` Thomas Petazzoni
  2018-04-17  7:04   ` Laurent GONZALEZ
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2018-04-17  6:49 UTC (permalink / raw)
  To: buildroot

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 ?

>  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

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
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29
  2018-04-17  6:49 ` Thomas Petazzoni
@ 2018-04-17  7:04   ` Laurent GONZALEZ
  2018-04-17  7:19     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent GONZALEZ @ 2018-04-17  7:04 UTC (permalink / raw)
  To: buildroot

On 17/04/2018 08:49, Thomas Petazzoni wrote:
> 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.

> > >> 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 > > 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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29
  2018-04-17  7:04   ` Laurent GONZALEZ
@ 2018-04-17  7:19     ` Thomas Petazzoni
  2018-04-17  8:08       ` Laurent GONZALEZ
  2018-04-17  9:39       ` Laurent GONZALEZ
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-04-17  7:19 UTC (permalink / raw)
  To: buildroot

Hello Laurent,

Could you ask Thunderbird to not send a HTML version of your e-mails
when sending to this mailing list?

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 ?

> 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
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29
  2018-04-17  7:19     ` Thomas Petazzoni
@ 2018-04-17  8:08       ` Laurent GONZALEZ
  2018-04-17  9:39       ` Laurent GONZALEZ
  1 sibling, 0 replies; 6+ messages in thread
From: Laurent GONZALEZ @ 2018-04-17  8:08 UTC (permalink / raw)
  To: buildroot

On 17/04/2018 09:19, Thomas Petazzoni wrote:
> 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
> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29
  2018-04-17  7:19     ` Thomas Petazzoni
  2018-04-17  8:08       ` Laurent GONZALEZ
@ 2018-04-17  9:39       ` Laurent GONZALEZ
  1 sibling, 0 replies; 6+ messages in thread
From: Laurent GONZALEZ @ 2018-04-17  9:39 UTC (permalink / raw)
  To: buildroot

I resend my previous mail for clarity.

On 17/04/2018 09:19, Thomas Petazzoni wrote:
> 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 !
> 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

>> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-17  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16 12:21 [Buildroot] [PATCH] package/binutils: Cortex-M targets require version <2.29 Laurent GONZALEZ
2018-04-17  6:49 ` Thomas Petazzoni
2018-04-17  7:04   ` Laurent GONZALEZ
2018-04-17  7:19     ` Thomas Petazzoni
2018-04-17  8:08       ` Laurent GONZALEZ
2018-04-17  9:39       ` Laurent GONZALEZ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.