toolchain: gcc: drop 110-Fix-MIPS-PR-84790.patch
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
a1b9c28edd ("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>
This commit is contained in:
parent
a40a1e5d02
commit
d8458334a7
@ -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)
|
|
||||||
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/gcc/config/mips/mips.cc
|
--- a/gcc/config/mips/mips.cc
|
||||||
+++ b/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;
|
flag_pcc_struct_return = 0;
|
||||||
|
|
||||||
/* Decide which rtx_costs structure to use. */
|
/* Decide which rtx_costs structure to use. */
|
||||||
|
|||||||
@ -31,8 +31,6 @@ the u8 literals everywhere are worth it either.
|
|||||||
libcody/server.cc | 28 ++++++++++++++--------------
|
libcody/server.cc | 28 ++++++++++++++--------------
|
||||||
3 files changed, 55 insertions(+), 31 deletions(-)
|
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
|
--- a/libcody/client.cc
|
||||||
+++ b/libcody/client.cc
|
+++ b/libcody/client.cc
|
||||||
@@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
|
@@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
|
||||||
@ -44,7 +42,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
e.append (strerror (err));
|
e.append (strerror (err));
|
||||||
|
|
||||||
return Packet (Client::PC_ERROR, std::move (e));
|
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)
|
if (e == EINVAL)
|
||||||
{
|
{
|
||||||
@ -87,7 +85,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
result.GetString () = std::move (msg);
|
result.GetString () = std::move (msg);
|
||||||
}
|
}
|
||||||
else if (result.GetCode () == Client::PC_CONNECT)
|
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)
|
size_t alen, size_t ilen)
|
||||||
{
|
{
|
||||||
write.BeginLine ();
|
write.BeginLine ();
|
||||||
@ -96,7 +94,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
write.AppendInteger (Version);
|
write.AppendInteger (Version);
|
||||||
write.AppendWord (agent, true, alen);
|
write.AppendWord (agent, true, alen);
|
||||||
write.AppendWord (ident, true, ilen);
|
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]
|
// HELLO $version $agent [$flags]
|
||||||
Packet ConnectResponse (std::vector<std::string> &words)
|
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_PATHNAME, std::move (words[1]));
|
||||||
|
|
||||||
return Packet (Client::PC_ERROR, u8"");
|
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
|
// OK or ERROR
|
||||||
Packet OKResponse (std::vector<std::string> &words)
|
Packet OKResponse (std::vector<std::string> &words)
|
||||||
{
|
{
|
||||||
@ -124,7 +122,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
return Packet (Client::PC_OK);
|
return Packet (Client::PC_OK);
|
||||||
else
|
else
|
||||||
return Packet (Client::PC_ERROR,
|
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
|
// PATHNAME $cmifile
|
||||||
Packet IncludeTranslateResponse (std::vector<std::string> &words)
|
Packet IncludeTranslateResponse (std::vector<std::string> &words)
|
||||||
{
|
{
|
||||||
@ -140,8 +138,6 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
return Packet (Client::PC_BOOL, 1);
|
return Packet (Client::PC_BOOL, 1);
|
||||||
else
|
else
|
||||||
return Packet (Client::PC_ERROR, u8"");
|
return Packet (Client::PC_ERROR, u8"");
|
||||||
diff --git a/libcody/cody.hh b/libcody/cody.hh
|
|
||||||
index 789ce9e70b7..93bce93aa94 100644
|
|
||||||
--- a/libcody/cody.hh
|
--- a/libcody/cody.hh
|
||||||
+++ b/libcody/cody.hh
|
+++ b/libcody/cody.hh
|
||||||
@@ -47,12 +47,21 @@ namespace Detail {
|
@@ -47,12 +47,21 @@ namespace Detail {
|
||||||
@ -193,8 +189,6 @@ index 789ce9e70b7..93bce93aa94 100644
|
|||||||
Packet (unsigned c, std::vector<std::string> &&v)
|
Packet (unsigned c, std::vector<std::string> &&v)
|
||||||
: vector (std::move (v)), cat (VECTOR), code (c)
|
: 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
|
--- a/libcody/server.cc
|
||||||
+++ b/libcody/server.cc
|
+++ b/libcody/server.cc
|
||||||
@@ -36,12 +36,12 @@ static RequestPair
|
@@ -36,12 +36,12 @@ static RequestPair
|
||||||
@ -245,7 +239,7 @@ index e2fa069bb93..c18469fae84 100644
|
|||||||
msg.append (strerror (err));
|
msg.append (strerror (err));
|
||||||
}
|
}
|
||||||
resolver->ErrorResponse (this, std::move (msg));
|
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;
|
return nullptr;
|
||||||
|
|
||||||
if (words.size () == 3)
|
if (words.size () == 3)
|
||||||
@ -254,6 +248,3 @@ index e2fa069bb93..c18469fae84 100644
|
|||||||
unsigned version = ParseUnsigned (words[1]);
|
unsigned version = ParseUnsigned (words[1]);
|
||||||
if (version == ~0u)
|
if (version == ~0u)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
--
|
|
||||||
2.53.0
|
|
||||||
|
|
||||||
|
|||||||
@ -31,8 +31,6 @@ the u8 literals everywhere are worth it either.
|
|||||||
libcody/server.cc | 28 ++++++++++++++--------------
|
libcody/server.cc | 28 ++++++++++++++--------------
|
||||||
3 files changed, 55 insertions(+), 31 deletions(-)
|
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
|
--- a/libcody/client.cc
|
||||||
+++ b/libcody/client.cc
|
+++ b/libcody/client.cc
|
||||||
@@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
|
@@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()
|
||||||
@ -44,7 +42,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
e.append (strerror (err));
|
e.append (strerror (err));
|
||||||
|
|
||||||
return Packet (Client::PC_ERROR, std::move (e));
|
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)
|
if (e == EINVAL)
|
||||||
{
|
{
|
||||||
@ -87,7 +85,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
result.GetString () = std::move (msg);
|
result.GetString () = std::move (msg);
|
||||||
}
|
}
|
||||||
else if (result.GetCode () == Client::PC_CONNECT)
|
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)
|
size_t alen, size_t ilen)
|
||||||
{
|
{
|
||||||
write.BeginLine ();
|
write.BeginLine ();
|
||||||
@ -96,7 +94,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
write.AppendInteger (Version);
|
write.AppendInteger (Version);
|
||||||
write.AppendWord (agent, true, alen);
|
write.AppendWord (agent, true, alen);
|
||||||
write.AppendWord (ident, true, ilen);
|
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]
|
// HELLO $version $agent [$flags]
|
||||||
Packet ConnectResponse (std::vector<std::string> &words)
|
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_PATHNAME, std::move (words[1]));
|
||||||
|
|
||||||
return Packet (Client::PC_ERROR, u8"");
|
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
|
// OK or ERROR
|
||||||
Packet OKResponse (std::vector<std::string> &words)
|
Packet OKResponse (std::vector<std::string> &words)
|
||||||
{
|
{
|
||||||
@ -124,7 +122,7 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
return Packet (Client::PC_OK);
|
return Packet (Client::PC_OK);
|
||||||
else
|
else
|
||||||
return Packet (Client::PC_ERROR,
|
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
|
// PATHNAME $cmifile
|
||||||
Packet IncludeTranslateResponse (std::vector<std::string> &words)
|
Packet IncludeTranslateResponse (std::vector<std::string> &words)
|
||||||
{
|
{
|
||||||
@ -140,8 +138,6 @@ index ae69d190cb7..147fecdbe50 100644
|
|||||||
return Packet (Client::PC_BOOL, 1);
|
return Packet (Client::PC_BOOL, 1);
|
||||||
else
|
else
|
||||||
return Packet (Client::PC_ERROR, u8"");
|
return Packet (Client::PC_ERROR, u8"");
|
||||||
diff --git a/libcody/cody.hh b/libcody/cody.hh
|
|
||||||
index 789ce9e70b7..93bce93aa94 100644
|
|
||||||
--- a/libcody/cody.hh
|
--- a/libcody/cody.hh
|
||||||
+++ b/libcody/cody.hh
|
+++ b/libcody/cody.hh
|
||||||
@@ -47,12 +47,21 @@ namespace Detail {
|
@@ -47,12 +47,21 @@ namespace Detail {
|
||||||
@ -193,8 +189,6 @@ index 789ce9e70b7..93bce93aa94 100644
|
|||||||
Packet (unsigned c, std::vector<std::string> &&v)
|
Packet (unsigned c, std::vector<std::string> &&v)
|
||||||
: vector (std::move (v)), cat (VECTOR), code (c)
|
: 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
|
--- a/libcody/server.cc
|
||||||
+++ b/libcody/server.cc
|
+++ b/libcody/server.cc
|
||||||
@@ -36,12 +36,12 @@ static RequestPair
|
@@ -36,12 +36,12 @@ static RequestPair
|
||||||
@ -245,7 +239,7 @@ index e2fa069bb93..c18469fae84 100644
|
|||||||
msg.append (strerror (err));
|
msg.append (strerror (err));
|
||||||
}
|
}
|
||||||
resolver->ErrorResponse (this, std::move (msg));
|
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;
|
return nullptr;
|
||||||
|
|
||||||
if (words.size () == 3)
|
if (words.size () == 3)
|
||||||
@ -254,6 +248,3 @@ index e2fa069bb93..c18469fae84 100644
|
|||||||
unsigned version = ParseUnsigned (words[1]);
|
unsigned version = ParseUnsigned (words[1]);
|
||||||
if (version == ~0u)
|
if (version == ~0u)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
--
|
|
||||||
2.53.0
|
|
||||||
|
|
||||||
|
|||||||
@ -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)
|
|
||||||
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
|||||||
|
|
||||||
--- a/gcc/config/mips/mips.cc
|
--- a/gcc/config/mips/mips.cc
|
||||||
+++ b/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;
|
flag_pcc_struct_return = 0;
|
||||||
|
|
||||||
/* Decide which rtx_costs structure to use. */
|
/* Decide which rtx_costs structure to use. */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user