[Buildroot] Binutils 2.41 cannot compile old Linux kernels
Edgar Bonet
bonet at grenoble.cnrs.fr
Sat Apr 6 19:32:46 UTC 2024
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
More information about the buildroot
mailing list