]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
toolchain: gcc: drop 110-Fix-MIPS-PR-84790.patch 23196/head
authorShiji Yang <yangshiji66@outlook.com>
Sat, 2 May 2026 06:36:05 +0000 (14:36 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 2 May 2026 23:18:09 +0000 (01:18 +0200)
The issue reported on the patch has been fixed in GCC 13.4.0[1],
14.2.0[2] and 15.1.0[3]. And we have already removed the GCC 14
patch variant in commit
a1b9c28edd72 ("toolchain: gcc: drop 110-Fix-MIPS-PR-84790.patch").

[1] https://gcc.gnu.org/cgit/gcc/commit/gcc/config/mips/mips.cc?h=releases/gcc-13.4.0&id=3be8fa7b19d218ca5812d71801e3e83ee2260ea0
[2] https://gcc.gnu.org/cgit/gcc/commit/gcc/config/mips/mips.cc?h=releases/gcc-14.2.0&id=201cfa725587d13867b4dc25955434ebe90aff7b
[3] https://gcc.gnu.org/cgit/gcc/commit/gcc/config/mips/mips.cc?h=releases/gcc-15.1.0&id=915440eed21de367cb41857afb5273aff5bcb737
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/23196
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
toolchain/gcc/patches-13.x/110-Fix-MIPS-PR-84790.patch [deleted file]
toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
toolchain/gcc/patches-14.x/004-libcody-Make-it-buildable-by-C-11-to-C-26.patch
toolchain/gcc/patches-15.x/004-libcody-Make-it-buildable-by-C-11-to-C-26.patch
toolchain/gcc/patches-15.x/110-Fix-MIPS-PR-84790.patch [deleted file]
toolchain/gcc/patches-15.x/300-mips_Os_cpu_rtx_cost_model.patch

diff --git a/toolchain/gcc/patches-13.x/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches-13.x/110-Fix-MIPS-PR-84790.patch
deleted file mode 100644 (file)
index 856fd6a..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
-MIPS16 functions have a static assembler prologue which clobbers
-registers v0 and v1. Add these register clobbers to function call
-instructions.
-
---- a/gcc/config/mips/mips.cc
-+++ b/gcc/config/mips/mips.cc
-@@ -3134,6 +3134,12 @@ mips_emit_call_insn (rtx pattern, rtx or
-       emit_insn (gen_update_got_version ());
-     }
-+  if (TARGET_MIPS16 && TARGET_USE_GOT)
-+    {
-+      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
-+      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
-+    }
-+
-   if (TARGET_MIPS16
-       && TARGET_EXPLICIT_RELOCS
-       && TARGET_CALL_CLOBBERED_GP)
index 87a3cab8387dc3280ae20cc84d90e838bc112cef..3a6d536fbc9d4512881f09a6981ad0a3b7c8ac75 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/gcc/config/mips/mips.cc
 +++ b/gcc/config/mips/mips.cc
-@@ -20228,7 +20228,7 @@ mips_option_override (void)
+@@ -20222,7 +20222,7 @@ mips_option_override (void)
      flag_pcc_struct_return = 0;
  
    /* Decide which rtx_costs structure to use.  */
index da355535c3c111a116342e1a10728f4d27262e4d..db25be919a897339eaad2b42a1f922188bf539a7 100644 (file)
@@ -31,8 +31,6 @@ the u8 literals everywhere are worth it either.
  libcody/server.cc | 28 ++++++++++++++--------------
  3 files changed, 55 insertions(+), 31 deletions(-)
 
-diff --git a/libcody/client.cc b/libcody/client.cc
-index ae69d190cb7..147fecdbe50 100644
 --- a/libcody/client.cc
 +++ b/libcody/client.cc
 @@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
@@ -44,7 +42,7 @@ index ae69d190cb7..147fecdbe50 100644
    e.append (strerror (err));
  
    return Packet (Client::PC_ERROR, std::move (e));
-@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,
+@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vec
      {
        if (e == EINVAL)
        {
@@ -87,7 +85,7 @@ index ae69d190cb7..147fecdbe50 100644
        result.GetString () = std::move (msg);
      }
    else if (result.GetCode () == Client::PC_CONNECT)
-@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agen
                          size_t alen, size_t ilen)
  {
    write.BeginLine ();
@@ -96,7 +94,7 @@ index ae69d190cb7..147fecdbe50 100644
    write.AppendInteger (Version);
    write.AppendWord (agent, true, alen);
    write.AppendWord (ident, true, ilen);
-@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agen
  // HELLO $version $agent [$flags]
  Packet ConnectResponse (std::vector<std::string> &words)
  {
@@ -115,7 +113,7 @@ index ae69d190cb7..147fecdbe50 100644
      return Packet (Client::PC_PATHNAME, std::move (words[1]));
  
    return Packet (Client::PC_ERROR, u8"");
-@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std::string> &words)
+@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std
  // OK or ERROR
  Packet OKResponse (std::vector<std::string> &words)
  {
@@ -124,7 +122,7 @@ index ae69d190cb7..147fecdbe50 100644
      return Packet (Client::PC_OK);
    else
      return Packet (Client::PC_ERROR,
-@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char const *include, Flags flags, size_t ilen)
+@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char co
  // PATHNAME $cmifile
  Packet IncludeTranslateResponse (std::vector<std::string> &words)
  {
@@ -140,8 +138,6 @@ index ae69d190cb7..147fecdbe50 100644
        return Packet (Client::PC_BOOL, 1);
        else
        return Packet (Client::PC_ERROR, u8"");
-diff --git a/libcody/cody.hh b/libcody/cody.hh
-index 789ce9e70b7..93bce93aa94 100644
 --- a/libcody/cody.hh
 +++ b/libcody/cody.hh
 @@ -47,12 +47,21 @@ namespace Detail  {
@@ -193,8 +189,6 @@ index 789ce9e70b7..93bce93aa94 100644
    Packet (unsigned c, std::vector<std::string> &&v)
      : vector (std::move (v)), cat (VECTOR), code (c)
    {
-diff --git a/libcody/server.cc b/libcody/server.cc
-index e2fa069bb93..c18469fae84 100644
 --- a/libcody/server.cc
 +++ b/libcody/server.cc
 @@ -36,12 +36,12 @@ static RequestPair
@@ -245,7 +239,7 @@ index e2fa069bb93..c18469fae84 100644
              msg.append (strerror (err));
            }
          resolver->ErrorResponse (this, std::move (msg));
-@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,
+@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Res
      return nullptr;
  
    if (words.size () == 3)
@@ -254,6 +248,3 @@ index e2fa069bb93..c18469fae84 100644
    unsigned version = ParseUnsigned (words[1]);
    if (version == ~0u)
      return nullptr;
--- 
-2.53.0
-
index da355535c3c111a116342e1a10728f4d27262e4d..db25be919a897339eaad2b42a1f922188bf539a7 100644 (file)
@@ -31,8 +31,6 @@ the u8 literals everywhere are worth it either.
  libcody/server.cc | 28 ++++++++++++++--------------
  3 files changed, 55 insertions(+), 31 deletions(-)
 
-diff --git a/libcody/client.cc b/libcody/client.cc
-index ae69d190cb7..147fecdbe50 100644
 --- a/libcody/client.cc
 +++ b/libcody/client.cc
 @@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
@@ -44,7 +42,7 @@ index ae69d190cb7..147fecdbe50 100644
    e.append (strerror (err));
  
    return Packet (Client::PC_ERROR, std::move (e));
-@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,
+@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vec
      {
        if (e == EINVAL)
        {
@@ -87,7 +85,7 @@ index ae69d190cb7..147fecdbe50 100644
        result.GetString () = std::move (msg);
      }
    else if (result.GetCode () == Client::PC_CONNECT)
-@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agen
                          size_t alen, size_t ilen)
  {
    write.BeginLine ();
@@ -96,7 +94,7 @@ index ae69d190cb7..147fecdbe50 100644
    write.AppendInteger (Version);
    write.AppendWord (agent, true, alen);
    write.AppendWord (ident, true, ilen);
-@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agent, char const *ident,
+@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agen
  // HELLO $version $agent [$flags]
  Packet ConnectResponse (std::vector<std::string> &words)
  {
@@ -115,7 +113,7 @@ index ae69d190cb7..147fecdbe50 100644
      return Packet (Client::PC_PATHNAME, std::move (words[1]));
  
    return Packet (Client::PC_ERROR, u8"");
-@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std::string> &words)
+@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std
  // OK or ERROR
  Packet OKResponse (std::vector<std::string> &words)
  {
@@ -124,7 +122,7 @@ index ae69d190cb7..147fecdbe50 100644
      return Packet (Client::PC_OK);
    else
      return Packet (Client::PC_ERROR,
-@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char const *include, Flags flags, size_t ilen)
+@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char co
  // PATHNAME $cmifile
  Packet IncludeTranslateResponse (std::vector<std::string> &words)
  {
@@ -140,8 +138,6 @@ index ae69d190cb7..147fecdbe50 100644
        return Packet (Client::PC_BOOL, 1);
        else
        return Packet (Client::PC_ERROR, u8"");
-diff --git a/libcody/cody.hh b/libcody/cody.hh
-index 789ce9e70b7..93bce93aa94 100644
 --- a/libcody/cody.hh
 +++ b/libcody/cody.hh
 @@ -47,12 +47,21 @@ namespace Detail  {
@@ -193,8 +189,6 @@ index 789ce9e70b7..93bce93aa94 100644
    Packet (unsigned c, std::vector<std::string> &&v)
      : vector (std::move (v)), cat (VECTOR), code (c)
    {
-diff --git a/libcody/server.cc b/libcody/server.cc
-index e2fa069bb93..c18469fae84 100644
 --- a/libcody/server.cc
 +++ b/libcody/server.cc
 @@ -36,12 +36,12 @@ static RequestPair
@@ -245,7 +239,7 @@ index e2fa069bb93..c18469fae84 100644
              msg.append (strerror (err));
            }
          resolver->ErrorResponse (this, std::move (msg));
-@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,
+@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Res
      return nullptr;
  
    if (words.size () == 3)
@@ -254,6 +248,3 @@ index e2fa069bb93..c18469fae84 100644
    unsigned version = ParseUnsigned (words[1]);
    if (version == ~0u)
      return nullptr;
--- 
-2.53.0
-
diff --git a/toolchain/gcc/patches-15.x/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches-15.x/110-Fix-MIPS-PR-84790.patch
deleted file mode 100644 (file)
index ea8625e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
-MIPS16 functions have a static assembler prologue which clobbers
-registers v0 and v1. Add these register clobbers to function call
-instructions.
-
---- a/gcc/config/mips/mips.cc
-+++ b/gcc/config/mips/mips.cc
-@@ -3293,6 +3293,12 @@ mips_emit_call_insn (rtx pattern, rtx or
-       emit_insn (gen_update_got_version ());
-     }
-+  if (TARGET_MIPS16 && TARGET_USE_GOT)
-+    {
-+      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
-+      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
-+    }
-+
-   if (TARGET_MIPS16
-       && TARGET_EXPLICIT_RELOCS
-       && TARGET_CALL_CLOBBERED_GP)
index fe9e69b35a4fd7d93ea296202183327b978beca6..27b9657a63bb1e0f921eb33aa7d868637234387c 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/gcc/config/mips/mips.cc
 +++ b/gcc/config/mips/mips.cc
-@@ -20605,7 +20605,7 @@ mips_option_override (void)
+@@ -20599,7 +20599,7 @@ mips_option_override (void)
      flag_pcc_struct_return = 0;
  
    /* Decide which rtx_costs structure to use.  */