loongarch: kernel: Apply an upstream fix for Binutils 2.42

Though the commit message mentions "recent Binutils and GCC trunk", I'm
99.99% sure this is only related to Binutils since the troubling
R_LARCH_RELAX/R_LARCH_ALIGN is appearing in some object files assembled
from .S files.

IMO this commit should be backported to even 6.1, but Huacai always
believe people using the latest Binutils should use the latest kernel.
And it seems Linux 6.8 won't catch LFS 12.1 package freeze, leaving me
no choice but backporting this downstream.
This commit is contained in:
Xi Ruoyao 2024-02-07 05:16:58 +08:00
parent 8b8b87bcb2
commit 2a71a83b9a
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3

View File

@ -294,6 +294,13 @@
configuration menus and create the kernel configuration from configuration menus and create the kernel configuration from
scratch.</para> scratch.</para>
<!-- https://git.kernel.org/torvalds/c/2772ae4d66d1 (simplified) -->
<para>Now fix an issue causing the kernel fail to build with Binutils
2.42 on LoongArch:</para>
<screen><userinput remap="pre">sed -e '/case EM_LOONG/aif (r_type == 100 || r_type == 102) continue;' \
-i scripts/mod/modpost.c</userinput></screen>
<para>Compile the kernel image and modules:</para> <para>Compile the kernel image and modules:</para>
<screen><userinput remap="make">make</userinput></screen> <screen><userinput remap="make">make</userinput></screen>