* [whinlatter][PATCH v2 1/2] binutils: Fix build with GLIBC 2.43 on the host
@ 2026-04-07 13:35 Zoltán Böszörményi
2026-04-07 13:35 ` [whinlatter][PATCH v2 2/2] gcc: Backport a patch to fix " Zoltán Böszörményi
2026-04-07 13:45 ` [whinlatter][PATCH v2 1/2] binutils: Fix " Martin Jansa
0 siblings, 2 replies; 5+ messages in thread
From: Zoltán Böszörményi @ 2026-04-07 13:35 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa, Zoltán Böszörményi
Added a patch to fix a build error in the CALL_UTIL() macro
when built against GLIBC 2.43 on Fedora 44. This fixes
binutils-native.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
.../binutils/binutils-2.45.inc | 1 +
...tect-against-standard-library-macros.patch | 34 +++++++++++++++++++
2 files changed, 35 insertions(+)
create mode 100644 meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
diff --git a/meta/recipes-devtools/binutils/binutils-2.45.inc b/meta/recipes-devtools/binutils/binutils-2.45.inc
index 16a63cabc5..666b588062 100644
--- a/meta/recipes-devtools/binutils/binutils-2.45.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.45.inc
@@ -46,4 +46,5 @@ SRC_URI = "\
file://0018-CVE-2025-11494.patch \
file://0019-CVE-2025-11839.patch \
file://0020-CVE-2025-11840.patch \
+ file://0001-gprofng-protect-against-standard-library-macros.patch \
"
diff --git a/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
new file mode 100644
index 0000000000..b626c51b6c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
@@ -0,0 +1,34 @@
+From 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41 Mon Sep 17 00:00:00 2001
+From: Andreas Schwab <schwab@suse.de>
+Date: Sat, 22 Nov 2025 11:29:43 +0100
+Subject: [PATCH] gprofng: protect against standard library macros
+
+The CALL_UTIL macro can expand to an unparsable expression of the argument
+is a macro, like with the new const-preserving standard library macros in
+C23.
+
+ * gprofng/src/collector_module.h (CALL_UTIL): Add parens to not
+ expand its argument if it is a function-like macro.
+
+Signed-off-by: Andreas Schwab <schwab@suse.de>
+Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5f66aee7f4bec7a2d8378034116f5e5c3dc50f41]
+---
+ gprofng/src/collector_module.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
+index b64d69c45ab..859a6dd1f7d 100644
+--- a/gprofng/src/collector_module.h
++++ b/gprofng/src/collector_module.h
+@@ -119,7 +119,7 @@ typedef struct CollectorUtilFuncs
+ extern CollectorUtilFuncs __collector_util_funcs;
+ extern int __collector_dlsym_guard;
+
+-#define CALL_UTIL(x) __collector_util_funcs.x
++#define CALL_UTIL(x) (__collector_util_funcs.x)
+
+ /* The following constants define the meaning of the "void *arg"
+ * argument of getFrameInfo().
+--
+2.53.0
+
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [whinlatter][PATCH v2 2/2] gcc: Backport a patch to fix build with GLIBC 2.43 on the host
2026-04-07 13:35 [whinlatter][PATCH v2 1/2] binutils: Fix build with GLIBC 2.43 on the host Zoltán Böszörményi
@ 2026-04-07 13:35 ` Zoltán Böszörményi
2026-04-08 10:02 ` Martin Jansa
[not found] ` <18A4597EF8495640.777565@lists.openembedded.org>
2026-04-07 13:45 ` [whinlatter][PATCH v2 1/2] binutils: Fix " Martin Jansa
1 sibling, 2 replies; 5+ messages in thread
From: Zoltán Böszörményi @ 2026-04-07 13:35 UTC (permalink / raw)
To: openembedded-core; +Cc: Martin Jansa, Zoltán Böszörményi
Added a patch to fix gcc-cross-<arch> built against GLIBC 2.43
on Fedora 44.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
meta/recipes-devtools/gcc/gcc-15.2.inc | 1 +
...dy-Make-it-buildable-by-C-11-to-C-26.patch | 262 ++++++++++++++++++
2 files changed, 263 insertions(+)
create mode 100644 meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
diff --git a/meta/recipes-devtools/gcc/gcc-15.2.inc b/meta/recipes-devtools/gcc/gcc-15.2.inc
index d178b25487..aef22f8347 100644
--- a/meta/recipes-devtools/gcc/gcc-15.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-15.2.inc
@@ -73,6 +73,7 @@ SRC_URI = "${BASEURI} \
file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \
file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \
file://0026-fix-pr90579-testcases.patch \
+ file://0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch \
"
UNPACKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/sources"
diff --git a/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch b/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
new file mode 100644
index 0000000000..676f1500e7
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
@@ -0,0 +1,262 @@
+From 1f0224e8ddb3d3d0bf4c7a11769b193a4df5cc37 Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek <jakub@redhat.com>
+Date: Fri, 21 Nov 2025 16:25:58 +0100
+Subject: [PATCH] libcody: Make it buildable by C++11 to C++26
+
+The following builds with -std=c++11 and c++14 and c++17 and c++20 and c++23
+and c++26.
+
+I see the u8 string literals are mixed e.g. with strerror, so in
+-fexec-charset=IBM1047 there will still be garbage, so am not 100% sure if
+the u8 literals everywhere are worth it either.
+
+2025-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ * cody.hh (S2C): For __cpp_char8_t >= 201811 use char8_t instead of
+ char in argument type.
+ (MessageBuffer::Space): Revert 2025-11-15 change.
+ (MessageBuffer::Append): For __cpp_char8_t >= 201811 add overload
+ with char8_t const * type of first argument.
+ (Packet::Packet): Similarly for first argument.
+ * client.cc (CommunicationError, Client::ProcessResponse,
+ Client::Connect, ConnectResponse, PathnameResponse, OKResponse,
+ IncludeTranslateResponse): Cast u8 string literals to (const char *)
+ where needed.
+ * server.cc (Server::ProcessRequests, ConnectRequest): Likewise.
+
+(cherry picked from commit 07a767c7a50d1daae8ef7d4aba73fe53ad40c0b7)
+
+Signed-off-by: Jakub Jelinek <jakub@redhat.com>
+Upstream-Status: Backport
+---
+ libcody/client.cc | 36 +++++++++++++++++++-----------------
+ libcody/cody.hh | 22 ++++++++++++++++++++++
+ 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 ()
+
+ static Packet CommunicationError (int err)
+ {
+- std::string e {u8"communication error:"};
++ std::string e {(const char *) u8"communication error:"};
+ e.append (strerror (err));
+
+ return Packet (Client::PC_ERROR, std::move (e));
+@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,
+ {
+ if (e == EINVAL)
+ {
+- std::string msg (u8"malformed string '");
++ std::string msg ((const char *) u8"malformed string '");
+ msg.append (words[0]);
+- msg.append (u8"'");
++ msg.append ((const char *) u8"'");
+ return Packet (Client::PC_ERROR, std::move (msg));
+ }
+ else
+- return Packet (Client::PC_ERROR, u8"missing response");
++ return Packet (Client::PC_ERROR, (const char *) u8"missing response");
+ }
+
+ Assert (!words.empty ());
+- if (words[0] == u8"ERROR")
++ if (words[0] == (const char *) u8"ERROR")
+ return Packet (Client::PC_ERROR,
+- words.size () == 2 ? words[1]: u8"malformed error response");
++ words.size () == 2 ? words[1]
++ : (const char *) u8"malformed error response");
+
+ if (isLast && !read.IsAtEnd ())
+ return Packet (Client::PC_ERROR,
+- std::string (u8"unexpected extra response"));
++ std::string ((const char *) u8"unexpected extra response"));
+
+ Assert (code < Detail::RC_HWM);
+ Packet result (responseTable[code] (words));
+ result.SetRequest (code);
+ if (result.GetCode () == Client::PC_ERROR && result.GetString ().empty ())
+ {
+- std::string msg {u8"malformed response '"};
++ std::string msg {(const char *) u8"malformed response '"};
+
+ read.LexedLine (msg);
+- msg.append (u8"'");
++ msg.append ((const char *) u8"'");
+ 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,
+ size_t alen, size_t ilen)
+ {
+ write.BeginLine ();
+- write.AppendWord (u8"HELLO");
++ write.AppendWord ((const char *) u8"HELLO");
+ 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,
+ // HELLO $version $agent [$flags]
+ Packet ConnectResponse (std::vector<std::string> &words)
+ {
+- if (words[0] == u8"HELLO" && (words.size () == 3 || words.size () == 4))
++ if (words[0] == (const char *) u8"HELLO"
++ && (words.size () == 3 || words.size () == 4))
+ {
+ char *eptr;
+ unsigned long val = strtoul (words[1].c_str (), &eptr, 10);
+@@ -247,7 +249,7 @@ Packet Client::ModuleRepo ()
+ // PATHNAME $dir | ERROR
+ Packet PathnameResponse (std::vector<std::string> &words)
+ {
+- if (words[0] == u8"PATHNAME" && words.size () == 2)
++ if (words[0] == (const char *) u8"PATHNAME" && words.size () == 2)
+ 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)
+ // OK or ERROR
+ Packet OKResponse (std::vector<std::string> &words)
+ {
+- if (words[0] == u8"OK")
++ if (words[0] == (const char *) u8"OK")
+ 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)
+ // PATHNAME $cmifile
+ Packet IncludeTranslateResponse (std::vector<std::string> &words)
+ {
+- if (words[0] == u8"BOOL" && words.size () == 2)
++ if (words[0] == (const char *) u8"BOOL" && words.size () == 2)
+ {
+- if (words[1] == u8"FALSE")
+- return Packet (Client::PC_BOOL, 0);
+- else if (words[1] == u8"TRUE")
++ if (words[1] == (const char *) u8"FALSE")
++ return Packet (Client::PC_BOOL);
++ else if (words[1] == (const char *) u8"TRUE")
+ 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 {
+
+ // C++11 doesn't have utf8 character literals :(
+
++#if __cpp_char8_t >= 201811
++template<unsigned I>
++constexpr char S2C (char8_t const (&s)[I])
++{
++ static_assert (I == 2, "only single octet strings may be converted");
++ return s[0];
++}
++#else
+ template<unsigned I>
+ constexpr char S2C (char const (&s)[I])
+ {
+ static_assert (I == 2, "only single octet strings may be converted");
+ return s[0];
+ }
++#endif
+
+ /// Internal buffering class. Used to concatenate outgoing messages
+ /// and Lex incoming ones.
+@@ -123,6 +132,13 @@ public:
+ Space ();
+ Append (str, maybe_quote, len);
+ }
++#if __cpp_char8_t >= 201811
++ void AppendWord (char8_t const *str, bool maybe_quote = false,
++ size_t len = ~size_t (0))
++ {
++ AppendWord ((const char *) str, maybe_quote, len);
++ }
++#endif
+ /// Add a word as with AppendWord
+ /// @param str the string to append
+ /// @param maybe_quote string might need quoting, as for Append
+@@ -264,6 +280,12 @@ public:
+ : string (s), cat (STRING), code (c)
+ {
+ }
++#if __cpp_char8_t >= 201811
++ Packet (unsigned c, const char8_t *s)
++ : string ((const char *) s), cat (STRING), code (c)
++ {
++ }
++#endif
+ 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
+ const requestTable[Detail::RC_HWM] =
+ {
+ // Same order as enum RequestCode
+- RequestPair {u8"HELLO", nullptr},
+- RequestPair {u8"MODULE-REPO", ModuleRepoRequest},
+- RequestPair {u8"MODULE-EXPORT", ModuleExportRequest},
+- RequestPair {u8"MODULE-IMPORT", ModuleImportRequest},
+- RequestPair {u8"MODULE-COMPILED", ModuleCompiledRequest},
+- RequestPair {u8"INCLUDE-TRANSLATE", IncludeTranslateRequest},
++ RequestPair {(const char *) u8"HELLO", nullptr},
++ RequestPair {(const char *) u8"MODULE-REPO", ModuleRepoRequest},
++ RequestPair {(const char *) u8"MODULE-EXPORT", ModuleExportRequest},
++ RequestPair {(const char *) u8"MODULE-IMPORT", ModuleImportRequest},
++ RequestPair {(const char *) u8"MODULE-COMPILED", ModuleCompiledRequest},
++ RequestPair {(const char *) u8"INCLUDE-TRANSLATE", IncludeTranslateRequest},
+ };
+ }
+
+@@ -135,21 +135,21 @@ void Server::ProcessRequests (void)
+ std::string msg;
+
+ if (err > 0)
+- msg = u8"error processing '";
++ msg = (const char *) u8"error processing '";
+ else if (ix >= Detail::RC_HWM)
+- msg = u8"unrecognized '";
++ msg = (const char *) u8"unrecognized '";
+ else if (IsConnected () && ix == Detail::RC_CONNECT)
+- msg = u8"already connected '";
++ msg = (const char *) u8"already connected '";
+ else if (!IsConnected () && ix != Detail::RC_CONNECT)
+- msg = u8"not connected '";
++ msg = (const char *) u8"not connected '";
+ else
+- msg = u8"malformed '";
++ msg = (const char *) u8"malformed '";
+
+ read.LexedLine (msg);
+- msg.append (u8"'");
++ msg.append ((const char *) u8"'");
+ if (err > 0)
+ {
+- msg.append (u8" ");
++ msg.append ((const char *) u8" ");
+ msg.append (strerror (err));
+ }
+ resolver->ErrorResponse (this, std::move (msg));
+@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,
+ return nullptr;
+
+ if (words.size () == 3)
+- words.emplace_back (u8"");
++ words.emplace_back ((const char *) u8"");
+ unsigned version = ParseUnsigned (words[1]);
+ if (version == ~0u)
+ return nullptr;
+--
+2.53.0
+
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [whinlatter][PATCH v2 1/2] binutils: Fix build with GLIBC 2.43 on the host
2026-04-07 13:35 [whinlatter][PATCH v2 1/2] binutils: Fix build with GLIBC 2.43 on the host Zoltán Böszörményi
2026-04-07 13:35 ` [whinlatter][PATCH v2 2/2] gcc: Backport a patch to fix " Zoltán Böszörményi
@ 2026-04-07 13:45 ` Martin Jansa
1 sibling, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2026-04-07 13:45 UTC (permalink / raw)
To: Zoltán Böszörményi; +Cc: openembedded-core
I've sent this one for scarthgap in:
https://patchwork.yoctoproject.org/project/oe-core/patch/20260326181450.1262870-6-martin.jansa@gmail.com/
but surprisingly gcc-cross nor binutils were failing for me in
whinlatter with ubuntu-26.04, please help asking Yoann to accept them
(https://lists.openembedded.org/g/bitbake-devel/message/19317),
because last message from him is that he is putting the glibc-2.43
series on hold until there is a new host with glibc-2.43 in
autobuilder and that will probably be after whinlatter is EOL :/.
Cheers,
On Tue, Apr 7, 2026 at 3:35 PM Zoltán Böszörményi <zboszor@gmail.com> wrote:
>
> Added a patch to fix a build error in the CALL_UTIL() macro
> when built against GLIBC 2.43 on Fedora 44. This fixes
> binutils-native.
>
> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> ---
> .../binutils/binutils-2.45.inc | 1 +
> ...tect-against-standard-library-macros.patch | 34 +++++++++++++++++++
> 2 files changed, 35 insertions(+)
> create mode 100644 meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
>
> diff --git a/meta/recipes-devtools/binutils/binutils-2.45.inc b/meta/recipes-devtools/binutils/binutils-2.45.inc
> index 16a63cabc5..666b588062 100644
> --- a/meta/recipes-devtools/binutils/binutils-2.45.inc
> +++ b/meta/recipes-devtools/binutils/binutils-2.45.inc
> @@ -46,4 +46,5 @@ SRC_URI = "\
> file://0018-CVE-2025-11494.patch \
> file://0019-CVE-2025-11839.patch \
> file://0020-CVE-2025-11840.patch \
> + file://0001-gprofng-protect-against-standard-library-macros.patch \
> "
> diff --git a/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
> new file mode 100644
> index 0000000000..b626c51b6c
> --- /dev/null
> +++ b/meta/recipes-devtools/binutils/binutils/0001-gprofng-protect-against-standard-library-macros.patch
> @@ -0,0 +1,34 @@
> +From 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41 Mon Sep 17 00:00:00 2001
> +From: Andreas Schwab <schwab@suse.de>
> +Date: Sat, 22 Nov 2025 11:29:43 +0100
> +Subject: [PATCH] gprofng: protect against standard library macros
> +
> +The CALL_UTIL macro can expand to an unparsable expression of the argument
> +is a macro, like with the new const-preserving standard library macros in
> +C23.
> +
> + * gprofng/src/collector_module.h (CALL_UTIL): Add parens to not
> + expand its argument if it is a function-like macro.
> +
> +Signed-off-by: Andreas Schwab <schwab@suse.de>
> +Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5f66aee7f4bec7a2d8378034116f5e5c3dc50f41]
> +---
> + gprofng/src/collector_module.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/gprofng/src/collector_module.h b/gprofng/src/collector_module.h
> +index b64d69c45ab..859a6dd1f7d 100644
> +--- a/gprofng/src/collector_module.h
> ++++ b/gprofng/src/collector_module.h
> +@@ -119,7 +119,7 @@ typedef struct CollectorUtilFuncs
> + extern CollectorUtilFuncs __collector_util_funcs;
> + extern int __collector_dlsym_guard;
> +
> +-#define CALL_UTIL(x) __collector_util_funcs.x
> ++#define CALL_UTIL(x) (__collector_util_funcs.x)
> +
> + /* The following constants define the meaning of the "void *arg"
> + * argument of getFrameInfo().
> +--
> +2.53.0
> +
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [whinlatter][PATCH v2 2/2] gcc: Backport a patch to fix build with GLIBC 2.43 on the host
2026-04-07 13:35 ` [whinlatter][PATCH v2 2/2] gcc: Backport a patch to fix " Zoltán Böszörményi
@ 2026-04-08 10:02 ` Martin Jansa
[not found] ` <18A4597EF8495640.777565@lists.openembedded.org>
1 sibling, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2026-04-08 10:02 UTC (permalink / raw)
To: Zoltán Böszörményi; +Cc: openembedded-core
I think this isn't caused by glibc-2.43, but gcc-16 on host, you should backport
https://git.openembedded.org/openembedded-core/commit/?id=9eabea38f0c17d41d97284d63a25e45da3c9bbcc
from master (so it's clear it's the same commit).
ubuntu-26.04 has glibc-2.43 but uses gcc-15 by default, that's why I
haven't seen this one in whinlatter nor scarthgap builds with it yet.
Not sure why I cannot reproduce the binutils one in whinlatter, I've
just rebuilt both binutils-native as well as target binutils without
an issue, probably because of:
meta/recipes-devtools/binutils/binutils_2.45.bb:EXTRA_OECONF:append:toolchain-clang
= " --disable-gprofng"
but that is also in scarthgap (and bitbake-getvar confirmed it in both
builds). Was it with target binutils or binutils-native?
On Tue, Apr 7, 2026 at 3:35 PM Zoltán Böszörményi <zboszor@gmail.com> wrote:
>
> Added a patch to fix gcc-cross-<arch> built against GLIBC 2.43
> on Fedora 44.
>
> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> ---
> meta/recipes-devtools/gcc/gcc-15.2.inc | 1 +
> ...dy-Make-it-buildable-by-C-11-to-C-26.patch | 262 ++++++++++++++++++
> 2 files changed, 263 insertions(+)
> create mode 100644 meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
>
> diff --git a/meta/recipes-devtools/gcc/gcc-15.2.inc b/meta/recipes-devtools/gcc/gcc-15.2.inc
> index d178b25487..aef22f8347 100644
> --- a/meta/recipes-devtools/gcc/gcc-15.2.inc
> +++ b/meta/recipes-devtools/gcc/gcc-15.2.inc
> @@ -73,6 +73,7 @@ SRC_URI = "${BASEURI} \
> file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \
> file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \
> file://0026-fix-pr90579-testcases.patch \
> + file://0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch \
> "
>
> UNPACKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/sources"
> diff --git a/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch b/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
> new file mode 100644
> index 0000000000..676f1500e7
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
> @@ -0,0 +1,262 @@
> +From 1f0224e8ddb3d3d0bf4c7a11769b193a4df5cc37 Mon Sep 17 00:00:00 2001
> +From: Jakub Jelinek <jakub@redhat.com>
> +Date: Fri, 21 Nov 2025 16:25:58 +0100
> +Subject: [PATCH] libcody: Make it buildable by C++11 to C++26
> +
> +The following builds with -std=c++11 and c++14 and c++17 and c++20 and c++23
> +and c++26.
> +
> +I see the u8 string literals are mixed e.g. with strerror, so in
> +-fexec-charset=IBM1047 there will still be garbage, so am not 100% sure if
> +the u8 literals everywhere are worth it either.
> +
> +2025-11-21 Jakub Jelinek <jakub@redhat.com>
> +
> + * cody.hh (S2C): For __cpp_char8_t >= 201811 use char8_t instead of
> + char in argument type.
> + (MessageBuffer::Space): Revert 2025-11-15 change.
> + (MessageBuffer::Append): For __cpp_char8_t >= 201811 add overload
> + with char8_t const * type of first argument.
> + (Packet::Packet): Similarly for first argument.
> + * client.cc (CommunicationError, Client::ProcessResponse,
> + Client::Connect, ConnectResponse, PathnameResponse, OKResponse,
> + IncludeTranslateResponse): Cast u8 string literals to (const char *)
> + where needed.
> + * server.cc (Server::ProcessRequests, ConnectRequest): Likewise.
> +
> +(cherry picked from commit 07a767c7a50d1daae8ef7d4aba73fe53ad40c0b7)
> +
> +Signed-off-by: Jakub Jelinek <jakub@redhat.com>
> +Upstream-Status: Backport
> +---
> + libcody/client.cc | 36 +++++++++++++++++++-----------------
> + libcody/cody.hh | 22 ++++++++++++++++++++++
> + 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 ()
> +
> + static Packet CommunicationError (int err)
> + {
> +- std::string e {u8"communication error:"};
> ++ std::string e {(const char *) u8"communication error:"};
> + e.append (strerror (err));
> +
> + return Packet (Client::PC_ERROR, std::move (e));
> +@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,
> + {
> + if (e == EINVAL)
> + {
> +- std::string msg (u8"malformed string '");
> ++ std::string msg ((const char *) u8"malformed string '");
> + msg.append (words[0]);
> +- msg.append (u8"'");
> ++ msg.append ((const char *) u8"'");
> + return Packet (Client::PC_ERROR, std::move (msg));
> + }
> + else
> +- return Packet (Client::PC_ERROR, u8"missing response");
> ++ return Packet (Client::PC_ERROR, (const char *) u8"missing response");
> + }
> +
> + Assert (!words.empty ());
> +- if (words[0] == u8"ERROR")
> ++ if (words[0] == (const char *) u8"ERROR")
> + return Packet (Client::PC_ERROR,
> +- words.size () == 2 ? words[1]: u8"malformed error response");
> ++ words.size () == 2 ? words[1]
> ++ : (const char *) u8"malformed error response");
> +
> + if (isLast && !read.IsAtEnd ())
> + return Packet (Client::PC_ERROR,
> +- std::string (u8"unexpected extra response"));
> ++ std::string ((const char *) u8"unexpected extra response"));
> +
> + Assert (code < Detail::RC_HWM);
> + Packet result (responseTable[code] (words));
> + result.SetRequest (code);
> + if (result.GetCode () == Client::PC_ERROR && result.GetString ().empty ())
> + {
> +- std::string msg {u8"malformed response '"};
> ++ std::string msg {(const char *) u8"malformed response '"};
> +
> + read.LexedLine (msg);
> +- msg.append (u8"'");
> ++ msg.append ((const char *) u8"'");
> + 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,
> + size_t alen, size_t ilen)
> + {
> + write.BeginLine ();
> +- write.AppendWord (u8"HELLO");
> ++ write.AppendWord ((const char *) u8"HELLO");
> + 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,
> + // HELLO $version $agent [$flags]
> + Packet ConnectResponse (std::vector<std::string> &words)
> + {
> +- if (words[0] == u8"HELLO" && (words.size () == 3 || words.size () == 4))
> ++ if (words[0] == (const char *) u8"HELLO"
> ++ && (words.size () == 3 || words.size () == 4))
> + {
> + char *eptr;
> + unsigned long val = strtoul (words[1].c_str (), &eptr, 10);
> +@@ -247,7 +249,7 @@ Packet Client::ModuleRepo ()
> + // PATHNAME $dir | ERROR
> + Packet PathnameResponse (std::vector<std::string> &words)
> + {
> +- if (words[0] == u8"PATHNAME" && words.size () == 2)
> ++ if (words[0] == (const char *) u8"PATHNAME" && words.size () == 2)
> + 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)
> + // OK or ERROR
> + Packet OKResponse (std::vector<std::string> &words)
> + {
> +- if (words[0] == u8"OK")
> ++ if (words[0] == (const char *) u8"OK")
> + 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)
> + // PATHNAME $cmifile
> + Packet IncludeTranslateResponse (std::vector<std::string> &words)
> + {
> +- if (words[0] == u8"BOOL" && words.size () == 2)
> ++ if (words[0] == (const char *) u8"BOOL" && words.size () == 2)
> + {
> +- if (words[1] == u8"FALSE")
> +- return Packet (Client::PC_BOOL, 0);
> +- else if (words[1] == u8"TRUE")
> ++ if (words[1] == (const char *) u8"FALSE")
> ++ return Packet (Client::PC_BOOL);
> ++ else if (words[1] == (const char *) u8"TRUE")
> + 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 {
> +
> + // C++11 doesn't have utf8 character literals :(
> +
> ++#if __cpp_char8_t >= 201811
> ++template<unsigned I>
> ++constexpr char S2C (char8_t const (&s)[I])
> ++{
> ++ static_assert (I == 2, "only single octet strings may be converted");
> ++ return s[0];
> ++}
> ++#else
> + template<unsigned I>
> + constexpr char S2C (char const (&s)[I])
> + {
> + static_assert (I == 2, "only single octet strings may be converted");
> + return s[0];
> + }
> ++#endif
> +
> + /// Internal buffering class. Used to concatenate outgoing messages
> + /// and Lex incoming ones.
> +@@ -123,6 +132,13 @@ public:
> + Space ();
> + Append (str, maybe_quote, len);
> + }
> ++#if __cpp_char8_t >= 201811
> ++ void AppendWord (char8_t const *str, bool maybe_quote = false,
> ++ size_t len = ~size_t (0))
> ++ {
> ++ AppendWord ((const char *) str, maybe_quote, len);
> ++ }
> ++#endif
> + /// Add a word as with AppendWord
> + /// @param str the string to append
> + /// @param maybe_quote string might need quoting, as for Append
> +@@ -264,6 +280,12 @@ public:
> + : string (s), cat (STRING), code (c)
> + {
> + }
> ++#if __cpp_char8_t >= 201811
> ++ Packet (unsigned c, const char8_t *s)
> ++ : string ((const char *) s), cat (STRING), code (c)
> ++ {
> ++ }
> ++#endif
> + 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
> + const requestTable[Detail::RC_HWM] =
> + {
> + // Same order as enum RequestCode
> +- RequestPair {u8"HELLO", nullptr},
> +- RequestPair {u8"MODULE-REPO", ModuleRepoRequest},
> +- RequestPair {u8"MODULE-EXPORT", ModuleExportRequest},
> +- RequestPair {u8"MODULE-IMPORT", ModuleImportRequest},
> +- RequestPair {u8"MODULE-COMPILED", ModuleCompiledRequest},
> +- RequestPair {u8"INCLUDE-TRANSLATE", IncludeTranslateRequest},
> ++ RequestPair {(const char *) u8"HELLO", nullptr},
> ++ RequestPair {(const char *) u8"MODULE-REPO", ModuleRepoRequest},
> ++ RequestPair {(const char *) u8"MODULE-EXPORT", ModuleExportRequest},
> ++ RequestPair {(const char *) u8"MODULE-IMPORT", ModuleImportRequest},
> ++ RequestPair {(const char *) u8"MODULE-COMPILED", ModuleCompiledRequest},
> ++ RequestPair {(const char *) u8"INCLUDE-TRANSLATE", IncludeTranslateRequest},
> + };
> + }
> +
> +@@ -135,21 +135,21 @@ void Server::ProcessRequests (void)
> + std::string msg;
> +
> + if (err > 0)
> +- msg = u8"error processing '";
> ++ msg = (const char *) u8"error processing '";
> + else if (ix >= Detail::RC_HWM)
> +- msg = u8"unrecognized '";
> ++ msg = (const char *) u8"unrecognized '";
> + else if (IsConnected () && ix == Detail::RC_CONNECT)
> +- msg = u8"already connected '";
> ++ msg = (const char *) u8"already connected '";
> + else if (!IsConnected () && ix != Detail::RC_CONNECT)
> +- msg = u8"not connected '";
> ++ msg = (const char *) u8"not connected '";
> + else
> +- msg = u8"malformed '";
> ++ msg = (const char *) u8"malformed '";
> +
> + read.LexedLine (msg);
> +- msg.append (u8"'");
> ++ msg.append ((const char *) u8"'");
> + if (err > 0)
> + {
> +- msg.append (u8" ");
> ++ msg.append ((const char *) u8" ");
> + msg.append (strerror (err));
> + }
> + resolver->ErrorResponse (this, std::move (msg));
> +@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,
> + return nullptr;
> +
> + if (words.size () == 3)
> +- words.emplace_back (u8"");
> ++ words.emplace_back ((const char *) u8"");
> + unsigned version = ParseUnsigned (words[1]);
> + if (version == ~0u)
> + return nullptr;
> +--
> +2.53.0
> +
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [whinlatter][PATCH v2 2/2] gcc: Backport a patch to fix build with GLIBC 2.43 on the host
[not found] ` <18A4597EF8495640.777565@lists.openembedded.org>
@ 2026-04-08 10:20 ` Martin Jansa
0 siblings, 0 replies; 5+ messages in thread
From: Martin Jansa @ 2026-04-08 10:20 UTC (permalink / raw)
To: martin.jansa; +Cc: Zoltán Böszörményi, openembedded-core
On Wed, Apr 8, 2026 at 12:02 PM Martin Jansa via
lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org>
wrote:
>
> I think this isn't caused by glibc-2.43, but gcc-16 on host, you should backport
> https://git.openembedded.org/openembedded-core/commit/?id=9eabea38f0c17d41d97284d63a25e45da3c9bbcc
> from master (so it's clear it's the same commit).
>
> ubuntu-26.04 has glibc-2.43 but uses gcc-15 by default, that's why I
> haven't seen this one in whinlatter nor scarthgap builds with it yet.
>
> Not sure why I cannot reproduce the binutils one in whinlatter, I've
> just rebuilt both binutils-native as well as target binutils without
> an issue, probably because of:
> meta/recipes-devtools/binutils/binutils_2.45.bb:EXTRA_OECONF:append:toolchain-clang
> = " --disable-gprofng"
> but that is also in scarthgap (and bitbake-getvar confirmed it in both
> builds). Was it with target binutils or binutils-native?
I take it back, I've checked --disable-gprofng in target build, but
then reverted my oe-core/scarthgap change to see it failing in
binutils-native and after checking binutils-native I see
--disable-gprofng only in scarthgap and that's indeed from
:append:toolchain-clang which in scarthgap affects both target and
native build while in whinlatter and newer I'm using toolchain-gcc for
native and toolchain-clang only for target.
Removing
meta/recipes-devtools/binutils/binutils_2.45.bb:EXTRA_OECONF:append:toolchain-clang
= " --disable-gprofng"
reproduces the issue in whinlatter. And cherry-picking the fix I've
sent for scarthgap fixes it for me as well (your commit backports the
same upstream change, so I believe would work as well).
I have added both into:
https://git.openembedded.org/openembedded-core-contrib/log/?h=jansa/whinlatter
Thanks
> > On Tue, Apr 7, 2026 at 3:35 PM Zoltán Böszörményi <zboszor@gmail.com> wrote:
> >
> > Added a patch to fix gcc-cross-<arch> built against GLIBC 2.43
> > on Fedora 44.
> >
> > Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> > ---
> > meta/recipes-devtools/gcc/gcc-15.2.inc | 1 +
> > ...dy-Make-it-buildable-by-C-11-to-C-26.patch | 262 ++++++++++++++++++
> > 2 files changed, 263 insertions(+)
> > create mode 100644 meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
> >
> > diff --git a/meta/recipes-devtools/gcc/gcc-15.2.inc b/meta/recipes-devtools/gcc/gcc-15.2.inc
> > index d178b25487..aef22f8347 100644
> > --- a/meta/recipes-devtools/gcc/gcc-15.2.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-15.2.inc
> > @@ -73,6 +73,7 @@ SRC_URI = "${BASEURI} \
> > file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \
> > file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \
> > file://0026-fix-pr90579-testcases.patch \
> > + file://0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch \
> > "
> >
> > UNPACKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/sources"
> > diff --git a/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch b/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
> > new file mode 100644
> > index 0000000000..676f1500e7
> > --- /dev/null
> > +++ b/meta/recipes-devtools/gcc/gcc/0001-libcody-Make-it-buildable-by-C-11-to-C-26.patch
> > @@ -0,0 +1,262 @@
> > +From 1f0224e8ddb3d3d0bf4c7a11769b193a4df5cc37 Mon Sep 17 00:00:00 2001
> > +From: Jakub Jelinek <jakub@redhat.com>
> > +Date: Fri, 21 Nov 2025 16:25:58 +0100
> > +Subject: [PATCH] libcody: Make it buildable by C++11 to C++26
> > +
> > +The following builds with -std=c++11 and c++14 and c++17 and c++20 and c++23
> > +and c++26.
> > +
> > +I see the u8 string literals are mixed e.g. with strerror, so in
> > +-fexec-charset=IBM1047 there will still be garbage, so am not 100% sure if
> > +the u8 literals everywhere are worth it either.
> > +
> > +2025-11-21 Jakub Jelinek <jakub@redhat.com>
> > +
> > + * cody.hh (S2C): For __cpp_char8_t >= 201811 use char8_t instead of
> > + char in argument type.
> > + (MessageBuffer::Space): Revert 2025-11-15 change.
> > + (MessageBuffer::Append): For __cpp_char8_t >= 201811 add overload
> > + with char8_t const * type of first argument.
> > + (Packet::Packet): Similarly for first argument.
> > + * client.cc (CommunicationError, Client::ProcessResponse,
> > + Client::Connect, ConnectResponse, PathnameResponse, OKResponse,
> > + IncludeTranslateResponse): Cast u8 string literals to (const char *)
> > + where needed.
> > + * server.cc (Server::ProcessRequests, ConnectRequest): Likewise.
> > +
> > +(cherry picked from commit 07a767c7a50d1daae8ef7d4aba73fe53ad40c0b7)
> > +
> > +Signed-off-by: Jakub Jelinek <jakub@redhat.com>
> > +Upstream-Status: Backport
> > +---
> > + libcody/client.cc | 36 +++++++++++++++++++-----------------
> > + libcody/cody.hh | 22 ++++++++++++++++++++++
> > + 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 ()
> > +
> > + static Packet CommunicationError (int err)
> > + {
> > +- std::string e {u8"communication error:"};
> > ++ std::string e {(const char *) u8"communication error:"};
> > + e.append (strerror (err));
> > +
> > + return Packet (Client::PC_ERROR, std::move (e));
> > +@@ -110,33 +110,34 @@ Packet Client::ProcessResponse (std::vector<std::string> &words,
> > + {
> > + if (e == EINVAL)
> > + {
> > +- std::string msg (u8"malformed string '");
> > ++ std::string msg ((const char *) u8"malformed string '");
> > + msg.append (words[0]);
> > +- msg.append (u8"'");
> > ++ msg.append ((const char *) u8"'");
> > + return Packet (Client::PC_ERROR, std::move (msg));
> > + }
> > + else
> > +- return Packet (Client::PC_ERROR, u8"missing response");
> > ++ return Packet (Client::PC_ERROR, (const char *) u8"missing response");
> > + }
> > +
> > + Assert (!words.empty ());
> > +- if (words[0] == u8"ERROR")
> > ++ if (words[0] == (const char *) u8"ERROR")
> > + return Packet (Client::PC_ERROR,
> > +- words.size () == 2 ? words[1]: u8"malformed error response");
> > ++ words.size () == 2 ? words[1]
> > ++ : (const char *) u8"malformed error response");
> > +
> > + if (isLast && !read.IsAtEnd ())
> > + return Packet (Client::PC_ERROR,
> > +- std::string (u8"unexpected extra response"));
> > ++ std::string ((const char *) u8"unexpected extra response"));
> > +
> > + Assert (code < Detail::RC_HWM);
> > + Packet result (responseTable[code] (words));
> > + result.SetRequest (code);
> > + if (result.GetCode () == Client::PC_ERROR && result.GetString ().empty ())
> > + {
> > +- std::string msg {u8"malformed response '"};
> > ++ std::string msg {(const char *) u8"malformed response '"};
> > +
> > + read.LexedLine (msg);
> > +- msg.append (u8"'");
> > ++ msg.append ((const char *) u8"'");
> > + 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,
> > + size_t alen, size_t ilen)
> > + {
> > + write.BeginLine ();
> > +- write.AppendWord (u8"HELLO");
> > ++ write.AppendWord ((const char *) u8"HELLO");
> > + 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,
> > + // HELLO $version $agent [$flags]
> > + Packet ConnectResponse (std::vector<std::string> &words)
> > + {
> > +- if (words[0] == u8"HELLO" && (words.size () == 3 || words.size () == 4))
> > ++ if (words[0] == (const char *) u8"HELLO"
> > ++ && (words.size () == 3 || words.size () == 4))
> > + {
> > + char *eptr;
> > + unsigned long val = strtoul (words[1].c_str (), &eptr, 10);
> > +@@ -247,7 +249,7 @@ Packet Client::ModuleRepo ()
> > + // PATHNAME $dir | ERROR
> > + Packet PathnameResponse (std::vector<std::string> &words)
> > + {
> > +- if (words[0] == u8"PATHNAME" && words.size () == 2)
> > ++ if (words[0] == (const char *) u8"PATHNAME" && words.size () == 2)
> > + 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)
> > + // OK or ERROR
> > + Packet OKResponse (std::vector<std::string> &words)
> > + {
> > +- if (words[0] == u8"OK")
> > ++ if (words[0] == (const char *) u8"OK")
> > + 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)
> > + // PATHNAME $cmifile
> > + Packet IncludeTranslateResponse (std::vector<std::string> &words)
> > + {
> > +- if (words[0] == u8"BOOL" && words.size () == 2)
> > ++ if (words[0] == (const char *) u8"BOOL" && words.size () == 2)
> > + {
> > +- if (words[1] == u8"FALSE")
> > +- return Packet (Client::PC_BOOL, 0);
> > +- else if (words[1] == u8"TRUE")
> > ++ if (words[1] == (const char *) u8"FALSE")
> > ++ return Packet (Client::PC_BOOL);
> > ++ else if (words[1] == (const char *) u8"TRUE")
> > + 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 {
> > +
> > + // C++11 doesn't have utf8 character literals :(
> > +
> > ++#if __cpp_char8_t >= 201811
> > ++template<unsigned I>
> > ++constexpr char S2C (char8_t const (&s)[I])
> > ++{
> > ++ static_assert (I == 2, "only single octet strings may be converted");
> > ++ return s[0];
> > ++}
> > ++#else
> > + template<unsigned I>
> > + constexpr char S2C (char const (&s)[I])
> > + {
> > + static_assert (I == 2, "only single octet strings may be converted");
> > + return s[0];
> > + }
> > ++#endif
> > +
> > + /// Internal buffering class. Used to concatenate outgoing messages
> > + /// and Lex incoming ones.
> > +@@ -123,6 +132,13 @@ public:
> > + Space ();
> > + Append (str, maybe_quote, len);
> > + }
> > ++#if __cpp_char8_t >= 201811
> > ++ void AppendWord (char8_t const *str, bool maybe_quote = false,
> > ++ size_t len = ~size_t (0))
> > ++ {
> > ++ AppendWord ((const char *) str, maybe_quote, len);
> > ++ }
> > ++#endif
> > + /// Add a word as with AppendWord
> > + /// @param str the string to append
> > + /// @param maybe_quote string might need quoting, as for Append
> > +@@ -264,6 +280,12 @@ public:
> > + : string (s), cat (STRING), code (c)
> > + {
> > + }
> > ++#if __cpp_char8_t >= 201811
> > ++ Packet (unsigned c, const char8_t *s)
> > ++ : string ((const char *) s), cat (STRING), code (c)
> > ++ {
> > ++ }
> > ++#endif
> > + 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
> > + const requestTable[Detail::RC_HWM] =
> > + {
> > + // Same order as enum RequestCode
> > +- RequestPair {u8"HELLO", nullptr},
> > +- RequestPair {u8"MODULE-REPO", ModuleRepoRequest},
> > +- RequestPair {u8"MODULE-EXPORT", ModuleExportRequest},
> > +- RequestPair {u8"MODULE-IMPORT", ModuleImportRequest},
> > +- RequestPair {u8"MODULE-COMPILED", ModuleCompiledRequest},
> > +- RequestPair {u8"INCLUDE-TRANSLATE", IncludeTranslateRequest},
> > ++ RequestPair {(const char *) u8"HELLO", nullptr},
> > ++ RequestPair {(const char *) u8"MODULE-REPO", ModuleRepoRequest},
> > ++ RequestPair {(const char *) u8"MODULE-EXPORT", ModuleExportRequest},
> > ++ RequestPair {(const char *) u8"MODULE-IMPORT", ModuleImportRequest},
> > ++ RequestPair {(const char *) u8"MODULE-COMPILED", ModuleCompiledRequest},
> > ++ RequestPair {(const char *) u8"INCLUDE-TRANSLATE", IncludeTranslateRequest},
> > + };
> > + }
> > +
> > +@@ -135,21 +135,21 @@ void Server::ProcessRequests (void)
> > + std::string msg;
> > +
> > + if (err > 0)
> > +- msg = u8"error processing '";
> > ++ msg = (const char *) u8"error processing '";
> > + else if (ix >= Detail::RC_HWM)
> > +- msg = u8"unrecognized '";
> > ++ msg = (const char *) u8"unrecognized '";
> > + else if (IsConnected () && ix == Detail::RC_CONNECT)
> > +- msg = u8"already connected '";
> > ++ msg = (const char *) u8"already connected '";
> > + else if (!IsConnected () && ix != Detail::RC_CONNECT)
> > +- msg = u8"not connected '";
> > ++ msg = (const char *) u8"not connected '";
> > + else
> > +- msg = u8"malformed '";
> > ++ msg = (const char *) u8"malformed '";
> > +
> > + read.LexedLine (msg);
> > +- msg.append (u8"'");
> > ++ msg.append ((const char *) u8"'");
> > + if (err > 0)
> > + {
> > +- msg.append (u8" ");
> > ++ msg.append ((const char *) u8" ");
> > + msg.append (strerror (err));
> > + }
> > + resolver->ErrorResponse (this, std::move (msg));
> > +@@ -176,7 +176,7 @@ Resolver *ConnectRequest (Server *s, Resolver *r,
> > + return nullptr;
> > +
> > + if (words.size () == 3)
> > +- words.emplace_back (u8"");
> > ++ words.emplace_back ((const char *) u8"");
> > + unsigned version = ParseUnsigned (words[1]);
> > + if (version == ~0u)
> > + return nullptr;
> > +--
> > +2.53.0
> > +
> > --
> > 2.53.0
> >
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#234826): https://lists.openembedded.org/g/openembedded-core/message/234826
> Mute This Topic: https://lists.openembedded.org/mt/118707561/3617156
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [martin.jansa@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-04-08 10:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 13:35 [whinlatter][PATCH v2 1/2] binutils: Fix build with GLIBC 2.43 on the host Zoltán Böszörményi
2026-04-07 13:35 ` [whinlatter][PATCH v2 2/2] gcc: Backport a patch to fix " Zoltán Böszörményi
2026-04-08 10:02 ` Martin Jansa
[not found] ` <18A4597EF8495640.777565@lists.openembedded.org>
2026-04-08 10:20 ` [OE-core] " Martin Jansa
2026-04-07 13:45 ` [whinlatter][PATCH v2 1/2] binutils: Fix " Martin Jansa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox