Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Binutils 2.41 cannot compile old Linux kernels
@ 2024-04-06 19:32 Edgar Bonet
  2024-04-06 21:34 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Edgar Bonet @ 2024-04-06 19:32 UTC (permalink / raw)
  To: buildroot

Hello Buildroot people!

Early this morning, the autobuilder wrote:
> Detail of defconfig failures for master [71 failures follow]

Trying to understand why there are so many failures. I examined three of
them:

 * acmesystems_aria_g25_256mb[0]
 * acmesystems_arietta_g25_256mb
 * atmel_sama5d3xek

and they all failed for the same reason: an incompatibility between old
Linux kernels and binutils 2.41. The failures were presumably triggered
by this patch from 2024-03-03:

    e88225ed88 package/binutils: make 2.41 the default version

Specifically, the assembly syntax

    .section ".proc.info.init", #alloc

which on old kernels is used by multiple files in arch/arm, is supported
by binutils 2.40 for all ELF targets “for compatibility with the Solaris
assembler”.[1] However, binutils 2.41 only supports this syntax for
Sparc ELF targets.[2]

The syntax was fixed on Linux by this commit

    790756c7e022 ARM: 8933/1: replace Sun/Solaris style flag on section directive

released on Linux mainline v5.5-rc1. This patch was then backported to
several stable branches (in v4.14.329, v4.19.298 and v5.4.203).

Now I wonder, what would be the proper way of fixing this issue within
buildroot? A straightforward solution is to add

    BR2_BINUTILS_VERSION_2_40_X=y

to those defconfigs, but this doesn't look like a long-term solution, as
buildroot will eventually drop support for this version of binutils.
Another option would be to bump the kernel version, but I assume this
should be done (and tested) by the maintainers of the affected
defconfigs. A third option would be to add Linux commit 790756c7e022 as
a patch, like:

    BR2_LINUX_KERNEL_PATCH=.../0001-ARM-8933-1-replace-Sun-Solaris-style-flag-on-section.patch

Any opinions?

Best regards,

Edgar Bonet.

[0] https://gitlab.com/buildroot.org/buildroot/-/jobs/6544500975
[1] https://sourceware.org/binutils/docs-2.40/as/Section.html
[2] https://sourceware.org/binutils/docs-2.41/as/Section.html
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-04-06 21:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 19:32 [Buildroot] Binutils 2.41 cannot compile old Linux kernels Edgar Bonet
2024-04-06 21:34 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox