mips64el: gcc: Fix an issue causing runtime failures with Glibc >= 2.41

The issue causes some units "requiring executable stack," notably
libgcc_s.so.1.  Glibc does not allow dlopen()ing such an unit now.
This commit is contained in:
Xi Ruoyao 2025-02-21 04:53:40 +08:00
parent 5775856809
commit e5c36a3456
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
3 changed files with 19 additions and 0 deletions

View File

@ -43,6 +43,14 @@
<sect2 role="installation">
<title>Installation of Cross GCC</title>
<!-- https://gcc.gnu.org/r15-3205
If unfixed it'll make libgcc_s.so.1 requiring execstack and
blow up Glibc >= 2.41 tests. -->
<para>At first, fix an issue causing runtime failures with Glibc-2.41 or
newer:</para>
<screen><userinput remap="pre">sed '/mips16.S/s|^//||' -i libgcc/config/mips/lib1funcs.S</userinput></screen>
<para>GCC requires the GMP, MPFR and MPC packages. As these packages may
not be included in your host distribution, they will be built with
GCC. Unpack each package into the GCC source directory and rename the

View File

@ -47,6 +47,12 @@
<screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-fixes-patch;</userinput></screen>
-->
<para>Again, fix the issue causing runtime failures with Glibc-2.41 or
newer:</para>
<screen><userinput remap="pre">sed '/mips16.S/s|^//||' -i libgcc/config/mips/lib1funcs.S</userinput></screen>
<para>As in the first build of GCC, the GMP, MPFR, and MPC packages are
required. Unpack the tarballs and move them into the required directories:</para>

View File

@ -41,6 +41,11 @@
<sect2 role="installation">
<title>Installation of GCC</title>
<para>Again, fix the issue causing runtime failures with Glibc-2.41 or
newer:</para>
<screen><userinput remap="pre">sed '/mips16.S/s|^//||' -i libgcc/config/mips/lib1funcs.S</userinput></screen>
<para>For building on 64-bit MIPS, change the default directory name for
64-bit libraries to <quote>lib</quote>:</para>