[lfs] 03/03: loongarch: gcc: add a patch

"Git Owner" ([email protected] via lfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.book
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch xry111/loongarch
in repository lfs.

commit c2a6ea1ecf92d8c8aff7a6f55e2cbd3e5d3fe3f5
Author: Xi Ruoyao <[email protected]>
AuthorDate: Thu Jan 29 20:52:26 2026 +0800

    loongarch: gcc: add a patch
    
    Fix a severe performance regression and two ICEs on LoongArch.  There
    are more LoongArch fixes pending in the releases/gcc-15 branch but I'm
    unsure if there's any significant necessity to introduce them.  I may
    make a -2 patch before 12.5 release if some issue is highlighted during
    test builds.
---
 chapter03/patches.xml | 7 +++++++
 chapter08/gcc.xml     | 5 +++++
 patches.ent           | 6 ++++++
 3 files changed, 18 insertions(+)

diff --git a/chapter03/patches.xml b/chapter03/patches.xml
index 4b38d1a52..9ae8567e8 100644
--- a/chapter03/patches.xml
+++ b/chapter03/patches.xml
@@ -75,6 +75,13 @@
       </listitem>
    </varlistentry>
 
+    <varlistentry>
+      <term>GCC LoongArch Fixes Patch - <token>&gcc-loongarch-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="https://www.linuxfromscratch.org/~xry111/lfs/patches/&gcc-loongarch-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-loongarch-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
 <!--
     <varlistentry>
       <term>Gcc glibc-2.36 Fixes Patch - <token>&gcc-upstream-fixes-patch-size;</token>:</term>
diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml
index 7c273f563..0450f0318 100644
--- a/chapter08/gcc.xml
+++ b/chapter08/gcc.xml
@@ -45,6 +45,11 @@
 
     <screen><userinput remap="pre">sed -i 's/char [*]q/const &amp;/' libgomp/affinity-fmt.c</userinput></screen>
 
+    <para>Fix a severe performance issue and two compiler crash issues
+    on LoongArch:</para>
+
+    <screen><userinput remap="pre">patch -Np1 -i ../&gcc-loongarch-fixes-patch;</userinput></screen>
+
     <para>Set the default directory name for
     64-bit libraries to <quote>lib</quote>:</para>
 
diff --git a/patches.ent b/patches.ent
index 55911d2d1..32c3f62b4 100644
--- a/patches.ent
+++ b/patches.ent
@@ -64,3 +64,9 @@
 <!ENTITY systemd-upstream-patch-md5 "8d9c1014445c463cf7c24c162b1e0686">
 <!ENTITY systemd-upstream-patch-size "7.2 KB">
 -->
+
+<!-- Put LoongArch patches last to reduce the chance of a conflict during
+     merge.  -->
+<!ENTITY gcc-loongarch-fixes-patch "gcc-&gcc-version;-loongarch_fixes-1.patch">
+<!ENTITY gcc-loongarch-fixes-patch-md5 "9e9ab8423aa3e37b68cf9f372d3c5cfa">
+<!ENTITY gcc-loongarch-fixes-patch-size "7.4 KB">

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.