{"id":2233375,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2233375/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/patch/20260506101646.131940-2-buildroot@bubu1.eu/","project":{"id":27,"url":"http://patchwork.ozlabs.org/api/1.1/projects/27/?format=json","name":"Buildroot development","link_name":"buildroot","list_id":"buildroot.buildroot.org","list_email":"buildroot@buildroot.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260506101646.131940-2-buildroot@bubu1.eu>","date":"2026-05-06T10:16:44","name":"[2025.02.x,2/2] package/gcc: fix gcc-12 build with host gcc 16","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"0c7ba348781d2f964014fdcf3c9f4fe34af53fd8","submitter":{"id":87807,"url":"http://patchwork.ozlabs.org/api/1.1/people/87807/?format=json","name":"Marcus Hoffmann","email":"buildroot@bubu1.eu"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/buildroot/patch/20260506101646.131940-2-buildroot@bubu1.eu/mbox/","series":[{"id":502952,"url":"http://patchwork.ozlabs.org/api/1.1/series/502952/?format=json","web_url":"http://patchwork.ozlabs.org/project/buildroot/list/?series=502952","date":"2026-05-06T10:16:43","name":"[2025.02.x,1/2] package/gcc: bump 12.x series to 12.5","version":1,"mbox":"http://patchwork.ozlabs.org/series/502952/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2233375/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2233375/checks/","tags":{},"headers":{"Return-Path":"<buildroot-bounces@buildroot.org>","X-Original-To":["incoming-buildroot@patchwork.ozlabs.org","buildroot@buildroot.org"],"Delivered-To":["patchwork-incoming-buildroot@legolas.ozlabs.org","buildroot@buildroot.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=buildroot.org header.i=@buildroot.org\n header.a=rsa-sha256 header.s=default header.b=oA2VeJ6R;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org)"],"Received":["from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g9WX56Qgbz1yJx\n\tfor <incoming-buildroot@patchwork.ozlabs.org>;\n Wed, 06 May 2026 20:17:09 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id CB03B60BF3;\n\tWed,  6 May 2026 10:17:07 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id rwAa-R364ewc; Wed,  6 May 2026 10:17:06 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 885C160E06;\n\tWed,  6 May 2026 10:17:06 +0000 (UTC)","from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n by lists1.osuosl.org (Postfix) with ESMTP id 16E2A280\n for <buildroot@buildroot.org>; Wed,  6 May 2026 10:17:04 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id F11DA82342\n for <buildroot@buildroot.org>; Wed,  6 May 2026 10:17:03 +0000 (UTC)","from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id asz7ihc9ttpp for <buildroot@buildroot.org>;\n Wed,  6 May 2026 10:17:03 +0000 (UTC)","from smtp.bubu1.eu (smtp.bubu1.eu [176.9.145.28])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 649D08231C\n for <buildroot@buildroot.org>; Wed,  6 May 2026 10:17:02 +0000 (UTC)","from bubutux.fritz.box (unknown [212.37.174.96])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits)\n server-digest\n SHA256) (No client certificate requested)\n by smtp.bubu1.eu (Postfix) with ESMTPSA id ADEDF2C88F85;\n Wed, 06 May 2026 12:16:59 +0200 (CEST)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org 885C160E06","OpenDKIM Filter v2.11.0 smtp1.osuosl.org 649D08231C"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=buildroot.org;\n\ts=default; t=1778062626;\n\tbh=ROss7xU//S1BwBCIhfaM19R7QYkBl+78L+E9eNFMpcY=;\n\th=To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From:Reply-To:From;\n\tb=oA2VeJ6RUvcv1S1o5psIM3Tvtw7s5Ndt2X5CNN3az8UdhzGDkVkEatm2M94pz7C89\n\t ZpeJ7KFQXw6WkxlC4rVZ9ZaOdVm13BMbekjXTlSERwKU7P/ya1fwCH3Gvp0CbpATR1\n\t u5rFCmNa+V/xvWkGITxtwPjlW1++V1TjJW3BVS0F7vAZBnLI/KpuwisxD3BrvZVEUR\n\t v9Li1tPuDECw4zzDJi3O8lQWaJhml0NAd7ktTil2BcMizIVIebKx5ECiiWAumAv6fE\n\t TH2kV8lJdWJGmsF4sqFRObjlXn0Yt3Ow6Qa+nVqeWnRQqOoZM7QnW/Fs5zW+7wMc7y\n\t 6vpj8BHfSpwwA==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=176.9.145.28;\n helo=smtp.bubu1.eu; envelope-from=buildroot@bubu1.eu; receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp1.osuosl.org 649D08231C","To":"buildroot@buildroot.org","Cc":"Giulio Benetti <giulio.benetti@benettiengineering.com>,\n Romain Naour <romain.naour@gmail.com>,\n Thomas Petazzoni <thomas.petazzoni@bootlin.com>","Date":"Wed,  6 May 2026 12:16:44 +0200","Message-ID":"<20260506101646.131940-2-buildroot@bubu1.eu>","X-Mailer":"git-send-email 2.54.0","In-Reply-To":"<20260506101646.131940-1-buildroot@bubu1.eu>","References":"<20260506101646.131940-1-buildroot@bubu1.eu>","MIME-Version":"1.0","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=bubu1.eu; s=bubu;\n t=1778062619; bh=H3FRdZ4GDCRBMSUwoSwuI4aoq17gQdjZu96ERbTFr3k=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=rp+OsAoTSWDc0ybw3cf/E0/qP87Lf3VX5msLwRDxxXM6u8dzHeUpNrU8pM5PhkdL5\n xSThm4Cw/zReZ/1c7AXWkfBAufV1FkXPQoE5kTDPPmcs5OIhWsoKmx7+p1xOLVyVTf\n /Fo4SeyZLDoPENuDtbZYYgw9JxeTT972MBDWC9llrLp4Sl/7X2EqxU4tYyQaomQp7X\n HaKQuc+TTVx2E+MEoSTrwZU47qkwusUy975qWu/98hs8uRamRnImHrRD2GhJRuMmXg\n jKL+F8vMfC2pfGlwFJGKr2bdntnmBWRHQPm2b8mUPIHx/T/KqRLW4MwGrAKIrx4Gra\n AL+ddTee22XlA==","X-Mailman-Original-Authentication-Results":["smtp1.osuosl.org;\n dmarc=pass (p=reject dis=none)\n header.from=bubu1.eu","smtp1.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=bubu1.eu header.i=@bubu1.eu header.a=rsa-sha256\n header.s=bubu header.b=rp+OsAoT"],"Subject":"[Buildroot] [PATCH 2025.02.x 2/2] package/gcc: fix gcc-12 build\n with host gcc 16","X-BeenThere":"buildroot@buildroot.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.buildroot.org>","List-Unsubscribe":"<https://lists.buildroot.org/mailman/options/buildroot>,\n <mailto:buildroot-request@buildroot.org?subject=unsubscribe>","List-Archive":"<http://lists.buildroot.org/pipermail/buildroot/>","List-Post":"<mailto:buildroot@buildroot.org>","List-Help":"<mailto:buildroot-request@buildroot.org?subject=help>","List-Subscribe":"<https://lists.buildroot.org/mailman/listinfo/buildroot>,\n <mailto:buildroot-request@buildroot.org?subject=subscribe>","From":"Marcus Hoffmann via buildroot <buildroot@buildroot.org>","Reply-To":"Marcus Hoffmann <buildroot@bubu1.eu>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@buildroot.org","Sender":"\"buildroot\" <buildroot-bounces@buildroot.org>"},"content":"GCC 12.x is unsupported upstream but the patches from the gcc-13 release\nbranch are easy enough to backport. The first one (libcody fix) applies\nwithout changes, the second one only needs to move one header instead of\ntwo for gcc-12.\n\nSigned-off-by: Marcus Hoffmann <buildroot@bubu1.eu>\n---\n ...dy-Make-it-buildable-by-C-11-to-C-26.patch | 261 ++++++++++++++++++\n ...y-include-above-safe-ctype.h-PR12483.patch |  70 +++++\n 2 files changed, 331 insertions(+)\n create mode 100644 package/gcc/12.5.0/0007-libcody-Make-it-buildable-by-C-11-to-C-26.patch\n create mode 100644 package/gcc/12.5.0/0008-build-Move-memory-include-above-safe-ctype.h-PR12483.patch","diff":"diff --git a/package/gcc/12.5.0/0007-libcody-Make-it-buildable-by-C-11-to-C-26.patch b/package/gcc/12.5.0/0007-libcody-Make-it-buildable-by-C-11-to-C-26.patch\nnew file mode 100644\nindex 0000000000..10afd54b1d\n--- /dev/null\n+++ b/package/gcc/12.5.0/0007-libcody-Make-it-buildable-by-C-11-to-C-26.patch\n@@ -0,0 +1,261 @@\n+From 150bc682f40cfa9121f84a3d35bf9d693b0c450a Mon Sep 17 00:00:00 2001\n+From: Jakub Jelinek <jakub@redhat.com>\n+Date: Fri, 21 Nov 2025 16:25:58 +0100\n+Subject: libcody: Make it buildable by C++11 to C++26\n+\n+The following builds with -std=c++11 and c++14 and c++17 and c++20 and c++23\n+and c++26.\n+\n+I see the u8 string literals are mixed e.g. with strerror, so in\n+-fexec-charset=IBM1047 there will still be garbage, so am not 100% sure if\n+the u8 literals everywhere are worth it either.\n+\n+2025-11-21  Jakub Jelinek  <jakub@redhat.com>\n+\n+\t* cody.hh (S2C): For __cpp_char8_t >= 201811 use char8_t instead of\n+\tchar in argument type.\n+\t(MessageBuffer::Space): Revert 2025-11-15 change.\n+\t(MessageBuffer::Append): For __cpp_char8_t >= 201811 add overload\n+\twith char8_t const * type of first argument.\n+\t(Packet::Packet): Similarly for first argument.\n+\t* client.cc (CommunicationError, Client::ProcessResponse,\n+\tClient::Connect, ConnectResponse, PathnameResponse, OKResponse,\n+\tIncludeTranslateResponse): Cast u8 string literals to (const char *)\n+\twhere needed.\n+\t* server.cc (Server::ProcessRequests, ConnectRequest): Likewise.\n+\n+(cherry picked from commit 07a767c7a50d1daae8ef7d4aba73fe53ad40c0b7)\n+Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>\n+Upstream: N/A (gcc-12 is nsupported upstream, patch taken from gcc-13 branch)\n+---\n+ libcody/client.cc | 36 +++++++++++++++++++-----------------\n+ libcody/cody.hh   | 22 ++++++++++++++++++++++\n+ libcody/server.cc | 28 ++++++++++++++--------------\n+ 3 files changed, 55 insertions(+), 31 deletions(-)\n+\n+diff --git a/libcody/client.cc b/libcody/client.cc\n+index ae69d190cb7..147fecdbe50 100644\n+--- a/libcody/client.cc\n++++ b/libcody/client.cc\n+@@ -97,7 +97,7 @@ int Client::CommunicateWithServer ()\n+ \n+ static Packet CommunicationError (int err)\n+ {\n+-  std::string e {u8\"communication error:\"};\n++  std::string e {(const char *) u8\"communication error:\"};\n+   e.append (strerror (err));\n+ \n+   return Packet (Client::PC_ERROR, std::move (e));\n+@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,\n+     {\n+       if (e == EINVAL)\n+ \t{\n+-\t  std::string msg (u8\"malformed string '\");\n++\t  std::string msg ((const char *) u8\"malformed string '\");\n+ \t  msg.append (words[0]);\n+-\t  msg.append (u8\"'\");\n++\t  msg.append ((const char *) u8\"'\");\n+ \t  return Packet (Client::PC_ERROR, std::move (msg));\n+ \t}\n+       else\n+-\treturn Packet (Client::PC_ERROR, u8\"missing response\");\n++\treturn Packet (Client::PC_ERROR, (const char *) u8\"missing response\");\n+     }\n+ \n+   Assert (!words.empty ());\n+-  if (words[0] == u8\"ERROR\")\n++  if (words[0] == (const char *) u8\"ERROR\")\n+     return Packet (Client::PC_ERROR,\n+-\t\t   words.size () == 2 ? words[1]: u8\"malformed error response\");\n++\t\t   words.size () == 2 ? words[1]\n++\t\t   : (const char *) u8\"malformed error response\");\n+ \n+   if (isLast && !read.IsAtEnd ())\n+     return Packet (Client::PC_ERROR,\n+-\t\t   std::string (u8\"unexpected extra response\"));\n++\t\t   std::string ((const char *) u8\"unexpected extra response\"));\n+ \n+   Assert (code < Detail::RC_HWM);\n+   Packet result (responseTable[code] (words));\n+   result.SetRequest (code);\n+   if (result.GetCode () == Client::PC_ERROR && result.GetString ().empty ())\n+     {\n+-      std::string msg {u8\"malformed response '\"};\n++      std::string msg {(const char *) u8\"malformed response '\"};\n+ \n+       read.LexedLine (msg);\n+-      msg.append (u8\"'\");\n++      msg.append ((const char *) u8\"'\");\n+       result.GetString () = std::move (msg);\n+     }\n+   else if (result.GetCode () == Client::PC_CONNECT)\n+@@ -199,7 +200,7 @@ Packet Client::Connect (char const *agent, char const *ident,\n+ \t\t\t  size_t alen, size_t ilen)\n+ {\n+   write.BeginLine ();\n+-  write.AppendWord (u8\"HELLO\");\n++  write.AppendWord ((const char *) u8\"HELLO\");\n+   write.AppendInteger (Version);\n+   write.AppendWord (agent, true, alen);\n+   write.AppendWord (ident, true, ilen);\n+@@ -211,7 +212,8 @@ Packet Client::Connect (char const *agent, char const *ident,\n+ // HELLO $version $agent [$flags]\n+ Packet ConnectResponse (std::vector<std::string> &words)\n+ {\n+-  if (words[0] == u8\"HELLO\" && (words.size () == 3 || words.size () == 4))\n++  if (words[0] == (const char *) u8\"HELLO\"\n++      && (words.size () == 3 || words.size () == 4))\n+     {\n+       char *eptr;\n+       unsigned long val = strtoul (words[1].c_str (), &eptr, 10);\n+@@ -247,7 +249,7 @@ Packet Client::ModuleRepo ()\n+ // PATHNAME $dir | ERROR\n+ Packet PathnameResponse (std::vector<std::string> &words)\n+ {\n+-  if (words[0] == u8\"PATHNAME\" && words.size () == 2)\n++  if (words[0] == (const char *) u8\"PATHNAME\" && words.size () == 2)\n+     return Packet (Client::PC_PATHNAME, std::move (words[1]));\n+ \n+   return Packet (Client::PC_ERROR, u8\"\");\n+@@ -256,7 +258,7 @@ Packet PathnameResponse (std::vector<std::string> &words)\n+ // OK or ERROR\n+ Packet OKResponse (std::vector<std::string> &words)\n+ {\n+-  if (words[0] == u8\"OK\")\n++  if (words[0] == (const char *) u8\"OK\")\n+     return Packet (Client::PC_OK);\n+   else\n+     return Packet (Client::PC_ERROR,\n+@@ -319,11 +321,11 @@ Packet Client::IncludeTranslate (char const *include, Flags flags, size_t ilen)\n+ // PATHNAME $cmifile\n+ Packet IncludeTranslateResponse (std::vector<std::string> &words)\n+ {\n+-  if (words[0] == u8\"BOOL\" && words.size () == 2)\n++  if (words[0] == (const char *) u8\"BOOL\" && words.size () == 2)\n+     {\n+-      if (words[1] == u8\"FALSE\")\n+-\treturn Packet (Client::PC_BOOL, 0);\n+-      else if (words[1] == u8\"TRUE\")\n++      if (words[1] == (const char *) u8\"FALSE\")\n++\treturn Packet (Client::PC_BOOL);\n++      else if (words[1] == (const char *) u8\"TRUE\")\n+ \treturn Packet (Client::PC_BOOL, 1);\n+       else\n+ \treturn Packet (Client::PC_ERROR, u8\"\");\n+diff --git a/libcody/cody.hh b/libcody/cody.hh\n+index 789ce9e70b7..93bce93aa94 100644\n+--- a/libcody/cody.hh\n++++ b/libcody/cody.hh\n+@@ -47,12 +47,21 @@ namespace Detail  {\n+ \n+ // C++11 doesn't have utf8 character literals :(\n+ \n++#if __cpp_char8_t >= 201811\n++template<unsigned I>\n++constexpr char S2C (char8_t const (&s)[I])\n++{\n++  static_assert (I == 2, \"only single octet strings may be converted\");\n++  return s[0];\n++}\n++#else\n+ template<unsigned I>\n+ constexpr char S2C (char const (&s)[I])\n+ {\n+   static_assert (I == 2, \"only single octet strings may be converted\");\n+   return s[0];\n+ }\n++#endif\n+ \n+ /// Internal buffering class.  Used to concatenate outgoing messages\n+ /// and Lex incoming ones.\n+@@ -123,6 +132,13 @@ public:\n+       Space ();\n+     Append (str, maybe_quote, len);\n+   }\n++#if __cpp_char8_t >= 201811\n++  void AppendWord (char8_t const *str, bool maybe_quote = false,\n++\t\t   size_t len = ~size_t (0))\n++  {\n++    AppendWord ((const char *) str, maybe_quote, len);\n++  }\n++#endif\n+   /// Add a word as with AppendWord\n+   /// @param str the string to append\n+   /// @param maybe_quote string might need quoting, as for Append\n+@@ -264,6 +280,12 @@ public:\n+     : string (s), cat (STRING), code (c)\n+   {\n+   }\n++#if __cpp_char8_t >= 201811\n++  Packet (unsigned c, const char8_t *s)\n++    : string ((const char *) s), cat (STRING), code (c)\n++  {\n++  }\n++#endif\n+   Packet (unsigned c, std::vector<std::string> &&v)\n+     : vector (std::move (v)), cat (VECTOR), code (c)\n+   {\n+diff --git a/libcody/server.cc b/libcody/server.cc\n+index e2fa069bb93..c18469fae84 100644\n+--- a/libcody/server.cc\n++++ b/libcody/server.cc\n+@@ -36,12 +36,12 @@ static RequestPair\n+   const requestTable[Detail::RC_HWM] =\n+   {\n+     // Same order as enum RequestCode\n+-    RequestPair {u8\"HELLO\", nullptr},\n+-    RequestPair {u8\"MODULE-REPO\", ModuleRepoRequest},\n+-    RequestPair {u8\"MODULE-EXPORT\", ModuleExportRequest},\n+-    RequestPair {u8\"MODULE-IMPORT\", ModuleImportRequest},\n+-    RequestPair {u8\"MODULE-COMPILED\", ModuleCompiledRequest},\n+-    RequestPair {u8\"INCLUDE-TRANSLATE\", IncludeTranslateRequest},\n++    RequestPair {(const char *) u8\"HELLO\", nullptr},\n++    RequestPair {(const char *) u8\"MODULE-REPO\", ModuleRepoRequest},\n++    RequestPair {(const char *) u8\"MODULE-EXPORT\", ModuleExportRequest},\n++    RequestPair {(const char *) u8\"MODULE-IMPORT\", ModuleImportRequest},\n++    RequestPair {(const char *) u8\"MODULE-COMPILED\", ModuleCompiledRequest},\n++    RequestPair {(const char *) u8\"INCLUDE-TRANSLATE\", IncludeTranslateRequest},\n+   };\n+ }\n+ \n+@@ -135,21 +135,21 @@ void Server::ProcessRequests (void)\n+ \t  std::string msg;\n+ \n+ \t  if (err > 0)\n+-\t    msg = u8\"error processing '\";\n++\t    msg = (const char *) u8\"error processing '\";\n+ \t  else if (ix >= Detail::RC_HWM)\n+-\t    msg = u8\"unrecognized '\";\n++\t    msg = (const char *) u8\"unrecognized '\";\n+ \t  else if (IsConnected () && ix == Detail::RC_CONNECT)\n+-\t    msg = u8\"already connected '\";\n++\t    msg = (const char *) u8\"already connected '\";\n+ \t  else if (!IsConnected () && ix != Detail::RC_CONNECT)\n+-\t    msg = u8\"not connected '\";\n++\t    msg = (const char *) u8\"not connected '\";\n+ \t  else\n+-\t    msg = u8\"malformed '\";\n++\t    msg = (const char *) u8\"malformed '\";\n+ \n+ \t  read.LexedLine (msg);\n+-\t  msg.append (u8\"'\");\n++\t  msg.append ((const char *) u8\"'\");\n+ \t  if (err > 0)\n+ \t    {\n+-\t      msg.append (u8\" \");\n++\t      msg.append ((const char *) u8\" \");\n+ \t      msg.append (strerror (err));\n+ \t    }\n+ \t  resolver->ErrorResponse (this, std::move (msg));\n+@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,\n+     return nullptr;\n+ \n+   if (words.size () == 3)\n+-    words.emplace_back (u8\"\");\n++    words.emplace_back ((const char *) u8\"\");\n+   unsigned version = ParseUnsigned (words[1]);\n+   if (version == ~0u)\n+     return nullptr;\n+-- \n+2.54.0\n+\ndiff --git a/package/gcc/12.5.0/0008-build-Move-memory-include-above-safe-ctype.h-PR12483.patch b/package/gcc/12.5.0/0008-build-Move-memory-include-above-safe-ctype.h-PR12483.patch\nnew file mode 100644\nindex 0000000000..166c1f0eae\n--- /dev/null\n+++ b/package/gcc/12.5.0/0008-build-Move-memory-include-above-safe-ctype.h-PR12483.patch\n@@ -0,0 +1,70 @@\n+From ed0afb9ed566b9bb9d8ad020979f133115a16d7e Mon Sep 17 00:00:00 2001\n+From: Andrew Pinski <quic_apinski@quicinc.com>\n+Date: Mon, 25 Nov 2024 14:03:27 -0800\n+Subject: [PATCH] build: Move  memory include above safe-ctype.h [PR124830]\n+\n+This picks r15-5661-gf6e00226a4ca6 to gcc-12 branch, moving only\n+the <memory> include to fix build issues with a C++20 host compiler.\n+\n+In some versions of libstdc++ the header includes locale which might not have been\n+included yet. safe-ctype.h defines the toupper, tolower, etc. as macros so the\n+c++ header files needed to be included before hand as comment in system.h says:\n+/* Include C++ standard headers before \"safe-ctype.h\" to avoid GCC\n+   poisoning the ctype macros through safe-ctype.h */\n+\n+I don't understand how it was working before when memory was included after\n+safe-ctype.h rather than before. But this makes it consistent with the\n+other C++ headers.\n+\n+gcc/ChangeLog:\n+\n+\tPR target/117771\n+\tPR c/124830\n+\t* system.h: Move the include of sstream and memory above safe-ctype.h.\n+\n+Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>\n+(cherry picked from commit 046776dac7cc74bdbab36f450af80644a045858a)\n+[Marcus: backport to gcc-12, only move memory, sstream is not included\n+in this version]\n+Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>\n+Upstream: N/A (gcc-12 is unsupported upstream, patch adapted from gcc-13\n+branch)\n+---\n+ gcc/system.h | 14 ++++++--------\n+ 1 file changed, 6 insertions(+), 8 deletions(-)\n+\n+diff --git a/gcc/system.h b/gcc/system.h\n+index 38733dd81a6..7c00fc68a97 100644\n+--- a/gcc/system.h\n++++ b/gcc/system.h\n+@@ -222,6 +222,12 @@ extern int fprintf_unlocked (FILE *, const char *, ...);\n+ #ifdef INCLUDE_FUNCTIONAL\n+ # include <functional>\n+ #endif\n++/* Some of the headers included by <memory> can use \"abort\" within a\n++   namespace, e.g. \"_VSTD::abort();\", which fails after we use the\n++   preprocessor to redefine \"abort\" as \"fancy_abort\" below.  */\n++#ifdef INCLUDE_MEMORY\n++# include <memory>\n++#endif\n+ # include <cstring>\n+ # include <initializer_list>\n+ # include <new>\n+@@ -733,14 +739,6 @@ extern int vsnprintf (char *, size_t, const char *, va_list);\n+ #define __builtin_expect(a, b) (a)\n+ #endif\n+ \n+-/* Some of the headers included by <memory> can use \"abort\" within a\n+-   namespace, e.g. \"_VSTD::abort();\", which fails after we use the\n+-   preprocessor to redefine \"abort\" as \"fancy_abort\" below.  */\n+-\n+-#ifdef INCLUDE_MEMORY\n+-# include <memory>\n+-#endif\n+-\n+ #ifdef INCLUDE_MALLOC_H\n+ #if defined(HAVE_MALLINFO) || defined(HAVE_MALLINFO2)\n+ #include <malloc.h>\n+-- \n+2.54.0\n+\n","prefixes":["2025.02.x","2/2"]}