From patchwork Thu Apr 9 15:28:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85685 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83886F31E33 for ; Thu, 9 Apr 2026 15:28:47 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.134993.1775748523994677874 for ; Thu, 09 Apr 2026 08:28:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=JgfmAthr; spf=pass (domain: gmail.com, ip: 209.85.221.43, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-43d5ec211abso450873f8f.0 for ; Thu, 09 Apr 2026 08:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748522; x=1776353322; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=c7Ntv5WlGXlL27P/RsBAxjbVszcLFVitE0WPg10Pytc=; b=JgfmAthrRR6dVGtogV16JWoX2HcWtsUWgwxgYL6Dslxe59lcXrlmU1cL7vhTrpelRr L3rF9siyVLKutq2WgdE31DU1Bv+KZAUmRLnzKIy9/08mgdRLjiqPmnB0n+8+NcLsffxn pytmCMCTjaLCtpK6Ue7rek3iXg2+z28i2HLCgDd68oMmKiY7/fFpvnJlHra5WAdiLhOT 8WhQfZUFEgYlyM2TT4n470DszQM5vQ1yb/UKK1p1tGLe9b1ceV0jMTaVFgff0HPJfSIW ozHZuwbuYBW0RbDcu6W41lgzXFuewIMM7FvLPEuD0uLiQ50rb+lfOkvfBkNB+Mu+N+c2 C3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748522; x=1776353322; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c7Ntv5WlGXlL27P/RsBAxjbVszcLFVitE0WPg10Pytc=; b=W8nx82wzLxyDWxqFmAoZ7I4uIQH3bZB8YgRvOiceEXUY1x7lyouRGE9M5/UAmNw3aR LwaNl8g8meQO4ldwpwrFq8L/R3CpLrtuJsNSErMN17BIFZclbdtqwH1uZUM4tgQLTL5s NB7GmsBk5DZiMZj/t7qNKt7/cgp+T98L2umdabU3xZGKp8MZd0+YkpX/cjQ9AMwyqbFH FdYet0D5q+FtNG1YjEZ/Z3V3odkslC1vaVL/Rz26YraQ4S0xVmYZUsCKDa9dt2hj1b2C aJK9vBHocoeWHkJPOVlHo+zpaddVftY7DscEac4ioLzgI4AtzBtb40JXqxKgtlnZ3RG4 3V2Q== X-Gm-Message-State: AOJu0Yy8RhqIb837dUkb3iICWuub47Ixm3YjogrNQVr2DaUIwRC/pai9 Kc9sUJss/DaEED04H+SDm6mL/HjRvl9k1AyHIsBGgipZHcMkGsMPCazgPgwzZg== X-Gm-Gg: AeBDiesBXs8Uz8vOChkUnxVfhUDCVfbTlUfqKbtce57Ai7xb6q2NckNBOebNYVuQatI 4KuhtnA/U4TAxljXY8IWQetEpbEB67wew/kVl42sZgstHfrAQf2OzG5Z/pKWxWm+Ocd9NvhwH0E zO6MOLOyObvgwq8fpPY8FBFCsaAw0Rw0TjDKcfIb9RRAXM8MghiWSQhAk/SuzNBYVkZzvR9ECy+ HydqoFHPsC3HPFgTx/554H4y3c23xP+dFfnzVbIw9lx3P7fazjJQ9vsmXHavupz2WFfV3bUB5Gb fSSFaRD7yMD2lBOfdR5h3LHmz3yeKZ7es0WOSEE+X+ZcqPY+OwSWaDFaCDJH4EtUY1ZfQhe5iq2 PXdM6IDMXm3VnXT+Ia6KZRrgiN0rXTJP6ddaIfZG9FZiZFagYymrgQG9149t97ln4oNQpyUILmb wmiORnMen3gWkAoCe3zq8aZyxBDQ== X-Received: by 2002:a5d:5d05:0:b0:43c:fbcd:4b4f with SMTP id ffacd0b85a97d-43d292e800dmr38331668f8f.47.1775748522008; Thu, 09 Apr 2026 08:28:42 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4f52easm68970449f8f.36.2026.04.09.08.28.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:41 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa , Mathieu Dubois-Briand , Richard Purdie Subject: [whinlatter][PATCH 1/9] dtc: backport fix for build with glibc-2.43 Date: Thu, 9 Apr 2026 17:28:20 +0200 Message-ID: <20260409152839.2894434-1-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234917 From: Martin Jansa glibc-2.43 isn't used in OE builds yet, but this fixes dtc-native: https://errors.yoctoproject.org/Errors/Details/903983/ ../sources/dtc-1.7.2/libfdt/fdt_overlay.c: In function ‘overlay_fixup_phandle’: ../sources/dtc-1.7.2/libfdt/fdt_overlay.c:424:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 424 | sep = memchr(fixup_str, ':', fixup_len); | ^ ../sources/dtc-1.7.2/libfdt/fdt_overlay.c:434:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 434 | sep = memchr(name, ':', fixup_len); | ^ cc1: all warnings being treated as errors Signed-off-by: Martin Jansa Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- .../0001-Fix-discarded-const-qualifiers.patch | 83 +++++++++++++++++++ meta/recipes-kernel/dtc/dtc_1.7.2.bb | 1 + 2 files changed, 84 insertions(+) create mode 100644 meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch diff --git a/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch new file mode 100644 index 0000000000..053a94f0bf --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch @@ -0,0 +1,83 @@ +From c58beee7bec0774f12202511c97beb741ff2b534 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Tue, 6 Jan 2026 14:19:30 -0500 +Subject: [PATCH] Fix discarded const qualifiers + +It's unsafe to implicitly discard the const qualifier on a pointer. In +overlay_fixup_phandle(), this was probably just an oversight, and making +the "sep" variable a const char * is sufficient to fix it. + +In create_node(), however, the "p" variable is directly modifying the +buffer pointed to by "const char* node_name". To fix this, we need to +actually make a duplicate of the buffer and operate on that instead. + +This introduces a malloc()/free() and an unbounded strdup() into the +operation, but fdtput isn't a long-running service and the node_name +argument comes directly from argv, so this shouldn't introduce a +significant performance impact. + +Signed-off-by: Stephen Gallagher +Signed-off-by: David Gibson +Signed-off-by: Martin Jansa +Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/libfdt/fdt_overlay.c?h=main&id=9a1c801a1a3c102bf95c5339c9e985b26b823a21] +--- + fdtput.c | 8 +++++--- + libfdt/fdt_overlay.c | 3 ++- + meson.build | 1 + + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/fdtput.c b/fdtput.c +index c2fecf4..8deec7e 100644 +--- a/fdtput.c ++++ b/fdtput.c +@@ -230,19 +230,21 @@ static int create_paths(char **blob, const char *in_path) + static int create_node(char **blob, const char *node_name) + { + int node = 0; +- char *p; ++ const char *p; ++ char *path = NULL; + + p = strrchr(node_name, '/'); + if (!p) { + report_error(node_name, -1, -FDT_ERR_BADPATH); + return -1; + } +- *p = '\0'; + + *blob = realloc_node(*blob, p + 1); + + if (p > node_name) { +- node = fdt_path_offset(*blob, node_name); ++ path = xstrndup(node_name, (size_t)(p - node_name)); ++ node = fdt_path_offset(*blob, path); ++ free(path); + if (node < 0) { + report_error(node_name, -1, node); + return -1; +diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c +index 28b667f..5f8aa62 100644 +--- a/libfdt/fdt_overlay.c ++++ b/libfdt/fdt_overlay.c +@@ -409,7 +409,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off, + const char *fixup_str = value; + uint32_t path_len, name_len; + uint32_t fixup_len; +- char *sep, *endptr; ++ const char *sep; ++ char *endptr; + int poffset, ret; + + fixup_end = memchr(value, '\0', len); +diff --git a/meson.build b/meson.build +index 310699f..2966b06 100644 +--- a/meson.build ++++ b/meson.build +@@ -18,6 +18,7 @@ add_project_arguments( + '-Wshadow', + '-Wsuggest-attribute=format', + '-Wwrite-strings', ++ '-Wdiscarded-qualifiers', + ]), + language: 'c' + ) diff --git a/meta/recipes-kernel/dtc/dtc_1.7.2.bb b/meta/recipes-kernel/dtc/dtc_1.7.2.bb index 92e83a9404..b8b79542c5 100644 --- a/meta/recipes-kernel/dtc/dtc_1.7.2.bb +++ b/meta/recipes-kernel/dtc/dtc_1.7.2.bb @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = " \ git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=main;protocol=https \ + file://0001-Fix-discarded-const-qualifiers.patch \ " SRCREV = "2d10aa2afe35527728db30b35ec491ecb6959e5c" From patchwork Thu Apr 9 15:28:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85684 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D3FEF31E35 for ; Thu, 9 Apr 2026 15:28:47 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.135340.1775748524584884443 for ; Thu, 09 Apr 2026 08:28:44 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=ZJBb6Erb; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43cfd832155so641546f8f.1 for ; Thu, 09 Apr 2026 08:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748523; x=1776353323; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qaF2ZqA6ejmwYl6nT7hja/uhPwl649Cfq1F7Lh+q6no=; b=ZJBb6ErbpSLwb+G315wd4zBUu4MMkt8me57yk0kz2+fyNob8Xcg6MXVuW8cZjQiY3H 8f2Dx2y3sQdamCeegXrT4lDM7vpbxfQzruyZ+1X8g/c34kpagbJjTeRpyoAX7TguN0IV VkI+KY3t+rAt3v7OdIW14ysmAhRUn/IHFVzj8l1X9y3C4qGtUZbz2DT28e+ezVMh8Vay QnGfksChR/ecYHLHISUC8lswheiDJNtLkeEDfr8G5ASkXTmVJjeVhRXMog84DTxcllYh gg4858CVMt0mUNVAlHdxS+12qAtLpEA1m1JPTE6+IxTeW/1DkIOwWIfeuOkOq/dTHj2f lkbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748523; x=1776353323; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qaF2ZqA6ejmwYl6nT7hja/uhPwl649Cfq1F7Lh+q6no=; b=P7IMsMdNqVwr+oFAjGUr4r0t30MNz/qDSkJzIZUpsONGFf3vr/Tz5nhdfsei+CK3Iq cH7zhNkVjNC4CPnTbu3VHtYPgukIxzD5P7+hc4WT51tRwzgnR4u3/Pr7fogASH7cCgEv uyYbxj5SvaQolOyq6+kZePGUS6P04GYX+ZqzpD7WVOaJm/DM8YtBieyOBwQfqnCAaRgb xdAGMxEmFVWc3oCiJe8yLhkGiO4PQGztsPbvfxphDy0wjhK2lBE7eLbul5MLj0eESccv Zgps2/iWb7gnRCnj8FU/keXzAgl0cEavrYW4j/WLfa3EzgbyDuTVbP3lV5lshYm3lFUk jh1A== X-Gm-Message-State: AOJu0Yx7xTfDc+fHwbz2QNpoUWQ4NIiAMUAhwZ1mkrLHPhXg8lEeXrmx ng3/4mUORuaa4e8CttXbPGhUkRkIHv+Jr+oSxZXCd0Vjz1mACFICMiXnhUaPTg== X-Gm-Gg: AeBDievUUBLm3Eb8APP4WZO4p4/I6C+dB7+NUtiyR9vFQ5bseqwRpY3CXCkgoKxBKXF NXV4F7mK5ocpX9nEneAg7o312Hh2WEgkA8v3NJ+CFX+OaPs6yvIqseBcedw0qZOtbcuf8CN//0C oRE7dGLOD0LdEkVcoXBDCB0/lGDAGQkpqgHwJekHHum7RMYuce89gkR1z2utIqJmDNqkcxK0dYK AP7zb9hZIOtrkeYdLMaBa8JroINJBKxNaI4QFz/6m7WFZKvWNy0orzHyjfg9Ol+0jj61TawkDUX ZH4QGni4umbOdtOn37gM1XO3mcf/p59kQ/KRGecz0rO+g08OGSCkpDOh2K4lCX8KisxSdDPuHv6 0ggUFs68K9LvocACUhBQxLCgoHy/eY1OBNLbYQZg1nQAngSUUgzkaHRYLUVCGqhUIdI021a8FG5 FPQ3sarc5xxbO+bYW1hYaw0q6VuA== X-Received: by 2002:a05:6000:40dd:b0:43d:1c39:593c with SMTP id ffacd0b85a97d-43d292e4021mr39256353f8f.30.1775748522849; Thu, 09 Apr 2026 08:28:42 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e2c50a7sm67801824f8f.15.2026.04.09.08.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:42 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Richard Purdie Subject: [whinlatter][PATCH 2/9] pseudo: Add fix for glibc 2.43 Date: Thu, 9 Apr 2026 17:28:21 +0200 Message-ID: <20260409152839.2894434-2-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234918 From: Richard Purdie Update to add a fix for a function definition to work with glibc 2.43. Signed-off-by: Richard Purdie --- meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index a26a205a16..4d31629903 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -12,7 +12,7 @@ SRC_URI:append:class-nativesdk = " \ file://older-glibc-symbols.patch" SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa" -SRCREV = "43cbd8fb4914328094ccdb4bb827d74b1bac2046" +SRCREV = "56e1f8df4761da60e41812fc32b1de797d1765e9" PV = "1.9.3+git" # largefile and 64bit time_t support adds these macros via compiler flags globally From patchwork Thu Apr 9 15:28:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85682 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74732F31E2E for ; Thu, 9 Apr 2026 15:28:47 +0000 (UTC) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.134994.1775748525536118722 for ; Thu, 09 Apr 2026 08:28:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=FlYEHxB7; spf=pass (domain: gmail.com, ip: 209.85.221.54, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-43b949bf4easo600679f8f.0 for ; Thu, 09 Apr 2026 08:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748524; x=1776353324; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6xYx6+4w7jX3M6Aoup4NUI8Mc3h5JJeX9em16Jcc7Fk=; b=FlYEHxB7PSizmAbtk0BVDyF/J5OSPsefFOldpk8Jsc+B4f9Y3njNrfKrP8U91FduB4 byFb6DVa4AqSYhg3y56qnV3LoLouvfw9LGeP2yjAj9KdSP50J5bz4V+0vaEDEkLKzyg7 lAOUK7mvWaAU3GGljGZYuPODUuykKLl8DnPrYGxvKJ2G3zMHBW9rZlPLxB6fMQHgi69R CiVSHd/Wec6+uki8IjNIPQ+FFqr7ousKq8OBH7sAUGoU8H4/GdVgRLXCyCg+8v0Y8VBQ rSdNuyVXYNU1X4xD7mcH2aKLL7NzMUggVGHCC+9eIanoZG8ppU4CwuRNYLv6+tT1pHQn BP8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748524; x=1776353324; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6xYx6+4w7jX3M6Aoup4NUI8Mc3h5JJeX9em16Jcc7Fk=; b=ThFjpEGdSLpEXBqOpBuW+bRb6sz1OU27LNmaPdah30VW/zHWAvycbz72SXM/bjT+VN S1SOnfX9s7WvlZS2DEZ0uPBB5pV//yOHK3oP5QaXVjeSdXFobAjfrZK4rVEZnz2iUMrd draqHTbR+k75AURmLk2Ah249F5xQGFE1xntJFt4t3W8T9uJnrRcQMXSrIw1gLHYOQe6v T8lIaccpQoS3sc/mV6YaVc30VyfU7YiHhVKn2fXTW9V8TH23D6GE6rG93qxs131UC06R HoO4iBabpohogPlFebrs+oIXFGaMVYr6/qo1UjH5xLPE7KF14hL+PAWpggxmnHgReAEQ ynCQ== X-Gm-Message-State: AOJu0YyuDHDdHRgD1eC2CPdwPEOVudvbldd+bycR1jzAqA+/rp4f7cvp czdYSkbKVaUevC0H3jP1z5hMcjYgsQfcAKX3vMzGqZ2TUnBlxfkwJj/bkFnaXQ== X-Gm-Gg: AeBDiet9ZGLw62+9D9q+861pRjmXFBO15pPGhjVOb/jvHv+MaUkGfHBydnXnTKXvaqq XGXF53XifeQBH0bbZzm1WN4SW6BTqLOwaL0WB7a9Gry6dS0kvjkiFJSTj9ngOs/DpPWZdl2QKmh Sw5ZMzI9cczDxtBorAlb3ftQJeDGxZBKAZpuYcTMB8+fnbsJg7DTXW8Sxaq79xBQ6uOkxMtMBNG bvmyun2ZgL4i4TYznV4SubtdXxRzpYzPxglXVi0gCO1RbCpNZt338ewjoxCsiZIrwW46m3xb7XP uToo7HNyVqgPgbmJphIVvSGIOqNjZMtsxFrXVXEbCKc1jisSAW9y5527KM2WANO6EQbZejwiPnZ nIPN1ZjaQur8R336bXT35yTFAdMq6RvEg9exumyNKDS2/OLeCLhMWlaxHr7t9X9YPC9GPqLxm/e v/afXJwImdhj5lw/Y6yRhleQ1mGz/B4uDXFA29 X-Received: by 2002:a05:6000:22c9:b0:43d:1bf6:91b with SMTP id ffacd0b85a97d-43d595b09d3mr6041976f8f.16.1775748523641; Thu, 09 Apr 2026 08:28:43 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d214f2b63sm62481250f8f.28.2026.04.09.08.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:43 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Michael Halstead , Richard Purdie Subject: [whinlatter][PATCH 3/9] yocto-uninative: Update to 5.1 for glibc 2.43 Date: Thu, 9 Apr 2026 17:28:22 +0200 Message-ID: <20260409152839.2894434-3-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234919 From: Michael Halstead yocto-uninative: Update to 5.1 for glibc 2.43 Signed-off-by: Michael Halstead Signed-off-by: Richard Purdie --- meta/conf/distro/include/yocto-uninative.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/conf/distro/include/yocto-uninative.inc b/meta/conf/distro/include/yocto-uninative.inc index e9dc6c8640..d97c96f631 100644 --- a/meta/conf/distro/include/yocto-uninative.inc +++ b/meta/conf/distro/include/yocto-uninative.inc @@ -6,10 +6,10 @@ # to the distro running on the build machine. # -UNINATIVE_MAXGLIBCVERSION = "2.42" -UNINATIVE_VERSION = "5.0" +UNINATIVE_MAXGLIBCVERSION = "2.43" +UNINATIVE_VERSION = "5.1" UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/" -UNINATIVE_CHECKSUM[aarch64] ?= "a25f2174d0cefcb22af005e9bc72ac01ae83b011c5b6d6d5bf00dac979877f76" -UNINATIVE_CHECKSUM[i686] ?= "959cc2539b692f9b9862825c7324a0fe4d061fca742f6c259f67f581c59af956" -UNINATIVE_CHECKSUM[x86_64] ?= "96045e8b1e242c8a849426a8506c7043f354b39f2bc0035192780e8205e23e9d" +UNINATIVE_CHECKSUM[aarch64] ?= "4166237a9dabd222dcb9627a9435dffd756764fabf76ed7ef2e93dc2964567ad" +UNINATIVE_CHECKSUM[i686] ?= "761502cc9aef4d54d0c6fe9418beb9fdd2c6220da6f2b04128c89f47902ab9ae" +UNINATIVE_CHECKSUM[x86_64] ?= "2b63a078c26535e0786e87f81ae69509df30f4dce40693004c527bd5e4ab2b85" From patchwork Thu Apr 9 15:28:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85683 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7477BF31E31 for ; Thu, 9 Apr 2026 15:28:47 +0000 (UTC) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.134995.1775748526437385897 for ; Thu, 09 Apr 2026 08:28:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=r6vBAd4p; spf=pass (domain: gmail.com, ip: 209.85.221.54, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-43d03db7f87so646842f8f.3 for ; Thu, 09 Apr 2026 08:28:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748525; x=1776353325; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QkL9xH03GlikxwZgze5ClhyfcW/n4K1mcmR4z7ebM6A=; b=r6vBAd4pDJcapM+zrVjopLdkfjK+OLIWhYYgPzb/zUGoHMjNGozkVqFJ0Nya437htC DQ9oAHGRaTjRY6QJPAjYKE1S/rCIxIkWZLwiuk8gR9WqfwqT0dWEIxFF3ocCnU6bjCms PbuTDNPx5QX5lSi35J2HkO10cO30St31/NBEogmIiARbGYx22oO5nb6/h+uhCdaYAUYx Bys6g7sWAFSodxSI8bnYgC+G5eHxeA/fZl/LeZyvIz3gPTmVco/nTDrVavc9hP+b4R+8 O83AHhwfJcjZJ0N4/r9XXjgz6AiPqWbrst4bLhZqVVTAixi7KL4VVXOLmLX1XgwyEZOG Vk7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748525; x=1776353325; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QkL9xH03GlikxwZgze5ClhyfcW/n4K1mcmR4z7ebM6A=; b=rDsr2ZKGzs8jcOQBrwmpZoJqq+6m2vr3Mg43JFDd+ETbCfIG4dcAvI6QFFVj7Wispf w4pqh7UEIRfAQ8zzXDIFG2rV+d9dbErsjhvvCvy2QJKJ37jAvs91Yp1WcF/hly2YJjMS tnTwnuTcMpCZAr86UExATh3CAhocAsEVHYYeiMgEsWs8Gy93FRojmjp7B2K8FcrPKAH7 iC8ikbwgthRLVtz6xyidE9cHOYUSit8IGcAyFkyPi1lUdr52QNeNb493dLgjI8A0hOC1 IV8KX4wj/bTTUDAVbwRAQiKrS1drZ1XCpVVEtT5apmMncglEtWG6hf/N/E0XVZsY0gwd SeBw== X-Gm-Message-State: AOJu0Yz0P/z0KmZsGaOemmFjc0jejG+L6Y35ngzSO3BdCLeAxxBxrh74 /1pbwd7Vl0x30FNUoutIW7ceo9oERyLgRyMk9YmCaJCznIea112M8melRpKKwA== X-Gm-Gg: AeBDieuFxVF6v3HaQhTVr/xVZREklhmIYJm2OQfmt8ki1GswOrRbLUdEQ7d01Wz009p Bz9fuflxXt0mSWhLZfZjzYGZBgNEpt9TlYGdDsK52ElE6J7prdv0ZpU3+fsiSzniSowSCAkazZC 59Ttwo4iUDjkz+/LrASfuJqiNxuTWtairXNLqR5GFoJnWDlP11hQZCR6lsX3Ysg7OVDucDq1Znc luuqSFGeI90zhdDTX0CH9FJfUBT34y2dxuVWhC2GPqnG4SJujdGDWbLecEV8J2zXxiamxzVUoiB efFCLNgJ1vvS5b6VVwnXm/I9pJ97HFqN83Quq+CX6sS5icZd0M+Hqu2hpdbIvNEB/bA5dAOJ73a oKzy9yVJmROY2jYfjV773XgB2W6dfMSSCyhygRvK1oxQGJLDeRPLhaTRxrfLQAIJOffS25LpzBM gRxyyS1tEULd/xc5QfzfExmXiZRg== X-Received: by 2002:a05:6000:25c6:b0:43c:ffee:ee91 with SMTP id ffacd0b85a97d-43d292ff366mr36836385f8f.36.1775748524485; Thu, 09 Apr 2026 08:28:44 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d5e969bbfsm5535109f8f.1.2026.04.09.08.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:44 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 4/9] m4: backport 3 gnulib changes to fix build with glibc-2.43 on host Date: Thu, 9 Apr 2026 17:28:23 +0200 Message-ID: <20260409152839.2894434-4-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:47 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234920 From: Martin Jansa All 3 are already included in m4-1.4.21 used in master. Signed-off-by: Martin Jansa --- meta/recipes-devtools/m4/m4-1.4.20.inc | 3 + ...-Fix-some-g-Wsystem-headers-warnings.patch | 135 ++++++++++++ ...pilation-error-on-macOS-with-fortify.patch | 126 ++++++++++++ ...23-qualifier-generic-fns-like-strchr.patch | 194 ++++++++++++++++++ 4 files changed, 458 insertions(+) create mode 100644 meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch create mode 100644 meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch create mode 100644 meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch diff --git a/meta/recipes-devtools/m4/m4-1.4.20.inc b/meta/recipes-devtools/m4/m4-1.4.20.inc index 5c4ba09288..df47e1e188 100644 --- a/meta/recipes-devtools/m4/m4-1.4.20.inc +++ b/meta/recipes-devtools/m4/m4-1.4.20.inc @@ -8,6 +8,9 @@ inherit autotools texinfo ptest gettext SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ file://0001-gettext-h-Avoid-gcc-Wformat-security-warnings-with-d.patch \ + file://0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch \ + file://0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch \ + file://0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch \ " SRC_URI:append:class-target = " file://run-ptest \ file://0001-test-c32ispunct-Check-for-musl-along-with-glibc.patch \ diff --git a/meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch b/meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch new file mode 100644 index 0000000000..63495a8443 --- /dev/null +++ b/meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch @@ -0,0 +1,135 @@ +From a9ff1a1ea55bee12751c751460a0102493fa65aa Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Mon, 12 May 2025 03:05:51 +0200 +Subject: [PATCH] string-h, wchar-h: Fix some g++ -Wsystem-headers warnings. + +* lib/string.in.h (memcpy, memccpy, memmove, strncpy, strndup, strncat, +memcmp, strncmp, memset): On glibc systems, declare with +_GL_ATTRIBUTE_NOTHROW. +* lib/wchar.in.h (wmemcpy, wmemmove, wcsncpy, wcsncat, wmemcmp, wcsncmp, +wmemset): Likewise. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0614c2db34f65c595d85be4adc5628778905855a] +Signed-off-by: Martin Jansa +--- + lib/string.in.h | 27 +++++++++++++++++++++++++++ + lib/wchar.in.h | 21 +++++++++++++++++++++ + 2 files changed, 48 insertions(+) + +diff --git a/lib/string.in.h b/lib/string.in.h +index e764221..e3d94b7 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -215,25 +215,49 @@ _GL_EXTERN_C void free (void *); + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ + _GL_EXTERN_C void *memcpy (void *__dest, const void *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C void *memccpy (void *__dest, const void *__src, int __c, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 4) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 4); + _GL_EXTERN_C void *memmove (void *__dest, const void *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C char *strncpy (char *__dest, const char *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C char *strndup (const char *__s, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2); + _GL_EXTERN_C char *strncat (char *__dest, const char *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int memcmp (const void *__s1, const void *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int strncmp (const char *__s1, const char *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +@@ -243,6 +267,9 @@ _GL_EXTERN_C void *memrchr (const void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C void *memset (void *__s, int __c, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + _GL_EXTERN_C void *memset_explicit (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); +diff --git a/lib/wchar.in.h b/lib/wchar.in.h +index 8836ed1..a6c52eb 100644 +--- a/lib/wchar.in.h ++++ b/lib/wchar.in.h +@@ -281,20 +281,38 @@ _GL_EXTERN_C void free (void *); + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ + _GL_EXTERN_C wchar_t *wmemcpy (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C wchar_t *wmemmove (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C wchar_t *wcsncpy (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C wchar_t *wcsncat (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +@@ -302,6 +320,9 @@ _GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + #endif + diff --git a/meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch b/meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch new file mode 100644 index 0000000000..ef7117997b --- /dev/null +++ b/meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch @@ -0,0 +1,126 @@ +From 84b6bcb2c691796d87b47bfcf815409ca2b9e461 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Thu, 10 Jul 2025 11:04:50 +0200 +Subject: [PATCH] string-h: Fix compilation error on macOS with fortify. + +Reported by Pierre Ossman at +. + +* lib/string.in.h (memcpy etc.): Don't redeclare functions that are +declared as macros. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=c44fe03b72687c9e913727724c29bdb49c1f86e3] +Signed-off-by: Martin Jansa +--- + lib/string.in.h | 58 +++++++++++++++++++++++++++++++++---------------- + 1 file changed, 39 insertions(+), 19 deletions(-) + +diff --git a/lib/string.in.h b/lib/string.in.h +index e3d94b7..9a039c7 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -214,65 +214,85 @@ _GL_EXTERN_C void free (void *); + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ ++# ifndef memcpy + _GL_EXTERN_C void *memcpy (void *__dest, const void *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef memccpy + _GL_EXTERN_C void *memccpy (void *__dest, const void *__src, int __c, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 4) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 4); ++# endif ++# ifndef memmove + _GL_EXTERN_C void *memmove (void *__dest, const void *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef strncpy + _GL_EXTERN_C char *strncpy (char *__dest, const char *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef strndup + _GL_EXTERN_C char *strndup (const char *__s, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2); ++# endif ++# ifndef strncat + _GL_EXTERN_C char *strncat (char *__dest, const char *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef memcmp + _GL_EXTERN_C int memcmp (const void *__s1, const void *__s2, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef strncmp + _GL_EXTERN_C int strncmp (const char *__s1, const char *__s2, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); +-# ifndef __cplusplus ++# endif ++# if !defined memchr && !defined __cplusplus + _GL_EXTERN_C void *memchr (const void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + _GL_EXTERN_C void *memrchr (const void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif ++# ifndef memset + _GL_EXTERN_C void *memset (void *__s, int __c, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); ++# endif ++# ifndef memset_explicit + _GL_EXTERN_C void *memset_explicit (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); ++# endif + #endif + + diff --git a/meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch b/meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch new file mode 100644 index 0000000000..7d88e45fa5 --- /dev/null +++ b/meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch @@ -0,0 +1,194 @@ +From 100cbc40da39dcdf259ebce2bd0f2b4889cf2204 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 23 Nov 2025 00:50:40 -0800 +Subject: [PATCH] Port to C23 qualifier-generic fns like strchr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This ports Gnulib to strict C23 platforms that reject code +like ‘char *q = strchr (P, 'x');’ when P is a pointer to const, +because in C23 strchr is a qualifier-generic function so +strchr (P, 'x') returns char const *. +This patch does not attempt to do the following two things, +which might be useful in the future: +1. When compiling on non-C23 platforms, check user code for +portability to platforms that define qualifier-generic functions. +2. Port Gnulib to platforms that have qualifier-generic functions +not listed in the C23 standard, e.g., strchrnul. I don’t know +of any such platforms. +* lib/argp-help.c (argp_doc): +* lib/c-strstr.c (c_strstr): +* lib/dfa.c (comsubs): +* lib/mbschr.c (mbschr): +* lib/mbspbrk.c (mbspbrk): +* lib/mbsrchr.c (mbsrchr): +* lib/memchr2.c (memchr2): +* lib/string-desc.c (_sd_index): +* tests/test-bsearch.c (lib_bsearch): +* tests/test-memchr.c (lib_memchr): +* tests/test-wmemchr.c (lib_wmemchr): +Port to C23, where functions like strchr are qualifier-generic. +* lib/c++defs.h (_GL_FUNCDECL_SYS_NAME): New macro. +* lib/c++defs.h (_GL_FUNCDECL_SYS): +* lib/stdlib.in.h (bsearch): +Use it, to prevent C23 names like strchr from acting like macros. +* lib/string.in.h (memchr, strchr, strpbrk, strrchr): +Do not #undef when GNULIB_POSIXCHECK is defined, as this could +cause conforming C23 code to fail to conform. It’s not clear why +_GL_WARN_ON_USE_CXX; perhaps it was needed but isn’t any more? +But for now, limit the removal of #undef to these four functions +where #undeffing is clearly undesirable in C23. +* lib/wchar.in.h (wmemchr): Parenthesize function name in decl, +to prevent it from acting like a macro. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=df17f4f37ed3ca373d23ad42eae51122bdb96626] +Signed-off-by: Martin Jansa +--- + lib/c++defs.h | 12 +++++++++++- + lib/memchr2.c | 2 +- + lib/stdlib.in.h | 6 +++--- + lib/string.in.h | 4 ---- + lib/wchar.in.h | 2 +- + tests/c++defs.h | 12 +++++++++++- + 6 files changed, 27 insertions(+), 11 deletions(-) + +diff --git a/lib/c++defs.h b/lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/lib/c++defs.h ++++ b/lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/lib/memchr2.c b/lib/memchr2.c +index 7493823..d7724ae 100644 +--- a/lib/memchr2.c ++++ b/lib/memchr2.c +@@ -55,7 +55,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n) + c2 = (unsigned char) c2_in; + + if (c1 == c2) +- return memchr (s, c1, n); ++ return (void *) memchr (s, c1, n); + + /* Handle the first few bytes by reading one byte at a time. + Do this until VOID_PTR is aligned on a longword boundary. */ +diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/lib/stdlib.in.h ++++ b/lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/lib/string.in.h b/lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/lib/wchar.in.h b/lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/lib/wchar.in.h ++++ b/lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/tests/c++defs.h b/tests/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/tests/c++defs.h ++++ b/tests/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func From patchwork Thu Apr 9 15:28:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85690 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BAEF6F31E39 for ; Thu, 9 Apr 2026 15:28:57 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.135342.1775748527720023090 for ; Thu, 09 Apr 2026 08:28:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=IZdxt3dn; spf=pass (domain: gmail.com, ip: 209.85.128.46, mailfrom: martin.jansa@gmail.com) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-4852a9c6309so10086725e9.0 for ; Thu, 09 Apr 2026 08:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748526; x=1776353326; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TlHn83iwvUkVFVK/6fbYCO3lVqeK3DbRFxJzWNIqc64=; b=IZdxt3dnNaWMxwHPdPB0pAKrIcl8cdnvH5eWfmsiX5SQ/ugsBFEAfhw4w9RniK9Sro OvGN7SRxtKU2yuDaN9KoDhJSIyq4tA9DyhkLfx3E3H0IBFa8NPPDQKXb3O9SelpRt8gj GqXMJtdtMeDxFfmpVXp6+Do7ynZeQTVvbHeXD8EFYHpAGtzALosiT+407EuctgPvbNjV 6Gr9abGU5U3QtyZs/EM2PtyT4MECslPsqsxzgzaCizzBwdVYegnOv4EHM1fBmIb5Yj4y oZMCQ55hlUVIVu4h5MBZY8WGoowYmdId6kDTELOZ5dIXFA18O0Kh2vyqsHUzySgnSQ8B mcow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748526; x=1776353326; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TlHn83iwvUkVFVK/6fbYCO3lVqeK3DbRFxJzWNIqc64=; b=ntPUaXEJf9pa9HQjP47+kuemmZWyMwzFoQmh7SjNZlJbgsBVco96QNamNRb6qHwddm CaefbO2JJ40iZoNDaqJFoL8hEGsKrqRDrWrYEH3GyT7MyQCvcXPbB7LKyynr5jTqoqv1 oZkPgD4w5KJGGC6Go5bqw7MojU7D8w29cp27Zgd28P1RgRD1Sq7v3gIfGSPtTGjPA9/b +p9p2kP+ZiwQUJktYVBf4rqCzcSH71yYfBVz28yJXEOXdChtOgH/D8G7KWvAfkiNNCJC ogNNzRv3XD1elxplXKetkRKtPiCO+UpAq2uQteU04dQYqT9Fmw6LQvCyb0YejmWGpop2 nFrQ== X-Gm-Message-State: AOJu0YxIKdWWCP0VHpqnzh3gzyE9QzJtB4cZUax3Vym0Eh8jb9cdujLa qV7mtkC7wbfs7Dnhs4nUIg+2pNAIdSj3f0l+46QUn6JAjEV7hsgGSe2h4kUKXQ== X-Gm-Gg: AeBDiet0b51K6RfZobSkKtO7waCw397MMvnh7Xwwt5JJKQx8rol5L0Y2JllrdoJTVQL oGXoHQTViTE3or9EQ7kRWr/pbSv6+9bOSsbzvxgjry34acdb2UklEzprFBRL2cZCcwepT1osH/o B3QQKAfFuRtFYJQrJ//euSiQ1sqQylbducHcJ7RI0uxIZVtEq6jllNeaes/A7ChTcrDzNdLXsE2 Mtxi3nnPfngn+EKFHJBJcGm4Lm0XqhYqcS1QnKBBykNWM148Dk6dnx5SXzp57DctQ4M0ourEWe+ Oto/b32BBiwiDrvMPBqi2XFQrD3p9Nfrw92CdayjZQiY+eueELFwmsjuppYpPCvKmT5z8tAAtkg Grq8UdgLwofpFuiE1/yGwcnCTFKytjIKUnXeBfkk+EbJ++BpugJBBWhuueMhkW3lphWl6kz8JXc lGqDgHBhdxgMHiEWcGHNVa7BaQBwG0yfx/CBWx X-Received: by 2002:a05:600c:4751:b0:485:ae14:8191 with SMTP id 5b1f17b1804b1-488ccf3e8c2mr55283875e9.5.1775748525383; Thu, 09 Apr 2026 08:28:45 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488cd10b1dbsm58154415e9.2.2026.04.09.08.28.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:45 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 5/9] gettext: backport gnulib changes to fix build with glibc-2.43 on host Date: Thu, 9 Apr 2026 17:28:24 +0200 Message-ID: <20260409152839.2894434-5-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234921 From: Martin Jansa It's already included in gettext-1.0 used in master. Unfortunately this need to be applied in 6 different copies of gnulib inside gettext repo. Signed-off-by: Martin Jansa --- ...23-qualifier-generic-fns-like-strchr.patch | 626 ++++++++++++++++++ meta/recipes-core/gettext/gettext_0.26.bb | 1 + 2 files changed, 627 insertions(+) create mode 100644 meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch diff --git a/meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch b/meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch new file mode 100644 index 0000000000..634e17ea78 --- /dev/null +++ b/meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch @@ -0,0 +1,626 @@ +From 64c9525e8664ec3b89475100cbeda06ed916e707 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 23 Nov 2025 00:50:40 -0800 +Subject: [PATCH] Port to C23 qualifier-generic fns like strchr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This ports Gnulib to strict C23 platforms that reject code +like ‘char *q = strchr (P, 'x');’ when P is a pointer to const, +because in C23 strchr is a qualifier-generic function so +strchr (P, 'x') returns char const *. +This patch does not attempt to do the following two things, +which might be useful in the future: +1. When compiling on non-C23 platforms, check user code for +portability to platforms that define qualifier-generic functions. +2. Port Gnulib to platforms that have qualifier-generic functions +not listed in the C23 standard, e.g., strchrnul. I don’t know +of any such platforms. +* lib/argp-help.c (argp_doc): +* lib/c-strstr.c (c_strstr): +* lib/dfa.c (comsubs): +* lib/mbschr.c (mbschr): +* lib/mbspbrk.c (mbspbrk): +* lib/mbsrchr.c (mbsrchr): +* lib/memchr2.c (memchr2): +* lib/string-desc.c (_sd_index): +* tests/test-bsearch.c (lib_bsearch): +* tests/test-memchr.c (lib_memchr): +* tests/test-wmemchr.c (lib_wmemchr): +Port to C23, where functions like strchr are qualifier-generic. +* lib/c++defs.h (_GL_FUNCDECL_SYS_NAME): New macro. +* lib/c++defs.h (_GL_FUNCDECL_SYS): +* lib/stdlib.in.h (bsearch): +Use it, to prevent C23 names like strchr from acting like macros. +* lib/string.in.h (memchr, strchr, strpbrk, strrchr): +Do not #undef when GNULIB_POSIXCHECK is defined, as this could +cause conforming C23 code to fail to conform. It’s not clear why +_GL_WARN_ON_USE_CXX; perhaps it was needed but isn’t any more? +But for now, limit the removal of #undef to these four functions +where #undeffing is clearly undesirable in C23. +* lib/wchar.in.h (wmemchr): Parenthesize function name in decl, +to prevent it from acting like a macro. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=df17f4f37ed3ca373d23ad42eae51122bdb96626] +Signed-off-by: Martin Jansa +--- + gettext-runtime/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-runtime/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-runtime/gnulib-lib/string.in.h | 4 ---- + gettext-runtime/gnulib-lib/wchar.in.h | 2 +- + gettext-runtime/intl/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-runtime/intl/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-runtime/intl/gnulib-lib/string.in.h | 4 ---- + gettext-runtime/intl/gnulib-lib/wchar.in.h | 2 +- + gettext-tools/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-tools/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-tools/gnulib-lib/string.in.h | 4 ---- + gettext-tools/gnulib-lib/wchar.in.h | 2 +- + gettext-tools/libgettextpo/c++defs.h | 12 +++++++++++- + gettext-tools/libgettextpo/stdlib.in.h | 6 +++--- + gettext-tools/libgettextpo/string.in.h | 4 ---- + gettext-tools/libgettextpo/wchar.in.h | 2 +- + gettext-tools/libgrep/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-tools/libgrep/gnulib-lib/memchr2.c | 2 +- + gettext-tools/libgrep/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-tools/libgrep/gnulib-lib/wchar.in.h | 2 +- + libtextstyle/lib/c++defs.h | 12 +++++++++++- + libtextstyle/lib/stdlib.in.h | 6 +++--- + libtextstyle/lib/string.in.h | 4 ---- + libtextstyle/lib/wchar.in.h | 2 +- + 24 files changed, 91 insertions(+), 51 deletions(-) + +diff --git a/gettext-runtime/gnulib-lib/c++defs.h b/gettext-runtime/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-runtime/gnulib-lib/c++defs.h ++++ b/gettext-runtime/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-runtime/gnulib-lib/stdlib.in.h b/gettext-runtime/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-runtime/gnulib-lib/stdlib.in.h ++++ b/gettext-runtime/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-runtime/gnulib-lib/string.in.h b/gettext-runtime/gnulib-lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-runtime/gnulib-lib/string.in.h ++++ b/gettext-runtime/gnulib-lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-runtime/gnulib-lib/wchar.in.h b/gettext-runtime/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-runtime/gnulib-lib/wchar.in.h ++++ b/gettext-runtime/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-runtime/intl/gnulib-lib/c++defs.h b/gettext-runtime/intl/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-runtime/intl/gnulib-lib/c++defs.h ++++ b/gettext-runtime/intl/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-runtime/intl/gnulib-lib/stdlib.in.h b/gettext-runtime/intl/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-runtime/intl/gnulib-lib/stdlib.in.h ++++ b/gettext-runtime/intl/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-runtime/intl/gnulib-lib/string.in.h b/gettext-runtime/intl/gnulib-lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-runtime/intl/gnulib-lib/string.in.h ++++ b/gettext-runtime/intl/gnulib-lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-runtime/intl/gnulib-lib/wchar.in.h b/gettext-runtime/intl/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-runtime/intl/gnulib-lib/wchar.in.h ++++ b/gettext-runtime/intl/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-tools/gnulib-lib/c++defs.h b/gettext-tools/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-tools/gnulib-lib/c++defs.h ++++ b/gettext-tools/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-tools/gnulib-lib/stdlib.in.h b/gettext-tools/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-tools/gnulib-lib/stdlib.in.h ++++ b/gettext-tools/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-tools/gnulib-lib/string.in.h b/gettext-tools/gnulib-lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-tools/gnulib-lib/string.in.h ++++ b/gettext-tools/gnulib-lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-tools/gnulib-lib/wchar.in.h b/gettext-tools/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-tools/gnulib-lib/wchar.in.h ++++ b/gettext-tools/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-tools/libgettextpo/c++defs.h b/gettext-tools/libgettextpo/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-tools/libgettextpo/c++defs.h ++++ b/gettext-tools/libgettextpo/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-tools/libgettextpo/stdlib.in.h b/gettext-tools/libgettextpo/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-tools/libgettextpo/stdlib.in.h ++++ b/gettext-tools/libgettextpo/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-tools/libgettextpo/string.in.h b/gettext-tools/libgettextpo/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-tools/libgettextpo/string.in.h ++++ b/gettext-tools/libgettextpo/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-tools/libgettextpo/wchar.in.h b/gettext-tools/libgettextpo/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-tools/libgettextpo/wchar.in.h ++++ b/gettext-tools/libgettextpo/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-tools/libgrep/gnulib-lib/c++defs.h b/gettext-tools/libgrep/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-tools/libgrep/gnulib-lib/c++defs.h ++++ b/gettext-tools/libgrep/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-tools/libgrep/gnulib-lib/memchr2.c b/gettext-tools/libgrep/gnulib-lib/memchr2.c +index 7493823..d7724ae 100644 +--- a/gettext-tools/libgrep/gnulib-lib/memchr2.c ++++ b/gettext-tools/libgrep/gnulib-lib/memchr2.c +@@ -55,7 +55,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n) + c2 = (unsigned char) c2_in; + + if (c1 == c2) +- return memchr (s, c1, n); ++ return (void *) memchr (s, c1, n); + + /* Handle the first few bytes by reading one byte at a time. + Do this until VOID_PTR is aligned on a longword boundary. */ +diff --git a/gettext-tools/libgrep/gnulib-lib/stdlib.in.h b/gettext-tools/libgrep/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-tools/libgrep/gnulib-lib/stdlib.in.h ++++ b/gettext-tools/libgrep/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-tools/libgrep/gnulib-lib/wchar.in.h b/gettext-tools/libgrep/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-tools/libgrep/gnulib-lib/wchar.in.h ++++ b/gettext-tools/libgrep/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/libtextstyle/lib/c++defs.h b/libtextstyle/lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/libtextstyle/lib/c++defs.h ++++ b/libtextstyle/lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/libtextstyle/lib/stdlib.in.h b/libtextstyle/lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/libtextstyle/lib/stdlib.in.h ++++ b/libtextstyle/lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/libtextstyle/lib/string.in.h b/libtextstyle/lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/libtextstyle/lib/string.in.h ++++ b/libtextstyle/lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/libtextstyle/lib/wchar.in.h b/libtextstyle/lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/libtextstyle/lib/wchar.in.h ++++ b/libtextstyle/lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) diff --git a/meta/recipes-core/gettext/gettext_0.26.bb b/meta/recipes-core/gettext/gettext_0.26.bb index b99b301af4..bb73015449 100644 --- a/meta/recipes-core/gettext/gettext_0.26.bb +++ b/meta/recipes-core/gettext/gettext_0.26.bb @@ -26,6 +26,7 @@ SRC_URI += " \ file://serial-tests-config.patch \ file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \ + file://0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch \ " SRC_URI:append:libc-musl = " file://0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch" From patchwork Thu Apr 9 15:28:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85688 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9747F31E3B for ; Thu, 9 Apr 2026 15:28:57 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.135343.1775748527933181210 for ; Thu, 09 Apr 2026 08:28:48 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=pkSV3kCs; spf=pass (domain: gmail.com, ip: 209.85.128.52, mailfrom: martin.jansa@gmail.com) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-482f454be5bso11102335e9.0 for ; Thu, 09 Apr 2026 08:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748526; x=1776353326; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YCXIkJbDCgDTJxFWdRmzTui09o8vqsTX7yMXYfLflVU=; b=pkSV3kCs+RbyFUdhC5CMjY/3M2yehdwRK7WRqJ8Wy6qMNM5pbnQLT69OG4fhVakQDp lGNoCx/VwoQtFAj5Gh1443yajkIiCh3Q8huZ5OPmT9ztbkyp16VgvLB9Iqq8XljPtMS1 29kBSyHg7vgKqm/SiCnqWYuae/P2/faNeFPXMmq2I3SNTJpjoGeyByEE+WkX8YKG8T4O RDfAf36yJLHP/s2g1LrBlVQs5kFkD+JLJN6G3Vvghg74fTpJ1MzyRTRYGqXVKDg3I86w Q8ZQg+sZxAm+/rJdKHXELx9c/X5ENSopfxRQu8rORGZgoQF+lz9PttyP0Q3oeHdXIKCX cJrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748526; x=1776353326; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YCXIkJbDCgDTJxFWdRmzTui09o8vqsTX7yMXYfLflVU=; b=Lwimh+qmgQeGfFez3lJK3SdlNZx+i0OehOwJYOSChu6kTvAmXOF6CtjhaB4WEnE4Am VJYK8u8jGPhT9gX8pPN7+8ooKRVLvDIi+VsdMeAqgsnx45pYekdfFBoNlF2qgby436gb jEwYA+1kay0KeanO9fifzLqgNgSkcNol1JgZ+fCEWTPicAG3oW7Ej9ESKQjE1RnRy9gx 1TcceqNfKASOnyMibZwiZAMwg+tpoJ8sxIyoxJ5fKS3CGZjdkt/chv4me4olTwVTboqc vWNv+0gh8B7up5EZhPxlqH1aJHHHiRHGgBVN0xt03TYg5mZZwQVxcmY4+sC1B8XqFXnQ OU3g== X-Gm-Message-State: AOJu0Yyh3qIBqdmxXq7C/wItMELBHvg4rwIqqPhbm+BanLsMCjljLOZN mtKQ+Aasy2DfLTim33X1HqDFgPPHnEr4mGhtRtGZBK9P7aqggFrWa2zmIJy+og== X-Gm-Gg: AeBDieu0wjXbCjxsHKpkTT6XVZBzLUtWZtOYzYvhMWgEDPfyTX9vKY+FsJGlDi8lYPb 4HM/IFFnSv9pKiIRmAyuZQA5aDcrH6Jd1AJscEDZqLeGwl+44v+nD0kIKvXVr5UIXTk0I/WN/Lo X6raWW1WQGN/mixhl3rUt3t/zH/WD4hCo/z85CFDBSFhzIbzpvLI9CED7vLScKgUJTETPGerDdd lKwEzB4eml2IQhdIMkGk2EQjyMouhHlpT9k5e/yTPPO11Pw0L7MTkywj9RJauYl+aZg8I6YbrSG 2lhS070m+cY5O7WIkpltYD8sQJ7XRYt+++JAtJbCf3CQlbvHumDZxEEaXcpVawGCUmWzJ3cF/fX lTYTDaHlPR3JVJ5QUk5H/XDJAMV/C76mugfvVUsN/iYZJ5uB13u7SrQZGyJ4OBkflcwJim0eCvv mrglhqqsdEZluNPDceSrN+9+6+Txu2PUBYjDYk X-Received: by 2002:a05:600c:4e89:b0:485:3428:774c with SMTP id 5b1f17b1804b1-488cd5282c4mr50166205e9.4.1775748526231; Thu, 09 Apr 2026 08:28:46 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488d532f337sm3741005e9.9.2026.04.09.08.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:45 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 6/9] util-linux: backport fix to build with glibc-2.43 on host Date: Thu, 9 Apr 2026 17:28:25 +0200 Message-ID: <20260409152839.2894434-6-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234922 From: Martin Jansa Signed-off-by: Martin Jansa --- meta/recipes-core/util-linux/util-linux.inc | 1 + ...x-bsearch-macro-usage-with-glibc-C23.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 3135bbb7c6..3bcf681f24 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -21,6 +21,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch \ file://0001-tests-helpers-test_sigstate.c-explicitly-reset-SIGIN.patch \ file://0001-include-mount-api-utils-avoid-using-sys-mount.h.patch \ + file://0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch \ file://CVE-2025-14104-01.patch \ file://CVE-2025-14104-02.patch \ " diff --git a/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch b/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch new file mode 100644 index 0000000000..6194594f7f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch @@ -0,0 +1,40 @@ +From 710a6989e0fc6dfc9290e2639022d1dbf429557f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Sat, 22 Nov 2025 10:41:08 -0300 +Subject: [PATCH] lsfd: fix bsearch macro usage with glibc C23 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +C23 requires bsearch to be a const preserving macro, build now fails +with + +../lsfd-cmd/lsfd.c:1879:75: error: macro ‘bsearch’ passed 6 arguments, but takes just 5 + 1879 | nfds, sizeof(struct pollfd), pollfdcmp)) + | ^ +In file included from ../include/c.h:17, + from ../lsfd-cmd/lsfd.c:48: +/usr/include/stdlib.h:987:10: note: macro ‘bsearch’ defined here + 987 | # define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \ + + add parenthesis around expression to fix it. + +Upstream-Status: Backport [2.42 https://github.com/util-linux/util-linux/commit/711bda1441561bfd2eb6d45fe0bc789535c1f1a8] +Signed-off-by: Martin Jansa +--- + lsfd-cmd/lsfd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c +index 75cd1de..9aae240 100644 +--- a/lsfd-cmd/lsfd.c ++++ b/lsfd-cmd/lsfd.c +@@ -1836,7 +1836,7 @@ static void mark_poll_fds_as_multiplexed(char *buf, + struct file *file = list_entry(f, struct file, files); + if (is_opened_file(file) && !file->multiplexed) { + int fd = file->association; +- if (bsearch(&(struct pollfd){.fd = fd,}, local.iov_base, ++ if (bsearch((&(struct pollfd){.fd = fd,}), local.iov_base, + nfds, sizeof(struct pollfd), pollfdcmp)) + file->multiplexed = 1; + } From patchwork Thu Apr 9 15:28:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85689 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4EABF31E37 for ; Thu, 9 Apr 2026 15:28:57 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.135344.1775748528763701512 for ; Thu, 09 Apr 2026 08:28:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=NfJ2cgYY; spf=pass (domain: gmail.com, ip: 209.85.221.45, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-43d04fc3bf2so605585f8f.3 for ; Thu, 09 Apr 2026 08:28:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748527; x=1776353327; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QVX0cNGJ247dfID8rDSwVYiCJfnPgyFMyJZX0EgNT5I=; b=NfJ2cgYYuTImbmDlCKTeJkdaA7+WWa/9XriFMtBv0C4RPc01aweHsmpUwijh5FTEUU z2+5YarZ4b4RFe7ZjGKC2jqIYHokT8SZxQVfdJu2Qs7GMBV0TUzcsa95UonxnXgt2Ef6 6m58OdE0bhkf72I+zXi2IF8HF7z21MQaX/DcbtKm1sOL6cPcq6/odIlavbICMsx2z6CN uX/ZYwNKZ71o8XClaJQARkyHuQznLakdhn3TwHozZpkwVF1OMkDYZ3E+QpR/NCGPVssg gaIaz4242eAqeGtabjqYzlrM5oBUIrCWYBiSs8wdb8FhnHPk91bPzbvhV2XVWOPV0WXj 6jCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748527; x=1776353327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QVX0cNGJ247dfID8rDSwVYiCJfnPgyFMyJZX0EgNT5I=; b=tKjIvfAJSn4vlbFVBTrMmPq3w6UaFtrE+EVgHlgCxJIUjeeBtUju5u9n2RXIEKEZCp iYnMDrnznb2xl6WGhD2Iv5fOoS5Hartcut/t2+czlmrzNKEyYkR3pZCddpwmCj0ULZ4T eN0Rc7kisDE7qhdb5A3fKCfrmFydHx5SMybbYV+v+HdiOm3Oafdys3tTfQlBqAaKhXeK 71bFokLa3zPAPnm91sOQOK3EBLYGJHwGYBR8UG2tDRKhffrUP/TgYJrssm6J288WoomY JLywGPfU3HyhAjLoyhThZtsaaE4nl+theSRvtAnISwc+Y9nxYSciI+2yl/87SpoMaqfu kVDg== X-Gm-Message-State: AOJu0YzoaH1AF1c0SBp+/Vy115RjkWP5g5DachwM2WpjRWWzdIMVBNZS B16Yid7aS+JQHulIjSyFj0RuAopmNie6x1fDf67dspi5vl/+BKFX3QwVr9skpw== X-Gm-Gg: AeBDiesg5p7OpxAauYIHKCzMBqwGIlPGmuYXQPy3DYV6oJdW8SnapugtoDFomcgRNj7 kMilHgL8NLt8l3sZEpZCQIyufeIqO4foQfrqQVAsO9ot773ywNXWOYq9/jc7VbhVdZB/0TAFedS f4k8uzeHDxdKA3Dq5sbSlgrvBFESpBXoXjpHQsHAgXu8XykHxFLucDIKFnL3CddRAnXxTakOR9Q IBIemTu3+kyiOazxfVUhjk+b1nTOzzmeqqWYfq7flmr7gftNUPUat++kUkBomn3aDWnPrdTMgiP X5Nx9ponVruBq7cXGJkqkq3yTZg+TiktSg96GPDOTnv+p6cVP3wTz2piZ/TJgmU3piGfTAZK4lI SJzkScxizCcgaNoRqdGu7vhi/4QopVzVA5RGDWVqjOplLqfMMSO1a6IBXlJxbEWWOQofIw5wGPE PUPb/NKc9WSc9nNUTAeJDq2/iVd1WXr2VaUL5j X-Received: by 2002:a5d:64c9:0:b0:43d:4d60:c2db with SMTP id ffacd0b85a97d-43d4d60c3abmr16205756f8f.46.1775748527023; Thu, 09 Apr 2026 08:28:47 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4f843dsm66201651f8f.37.2026.04.09.08.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:46 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 7/9] systemd: backport fix to build with glibc-2.43 on host Date: Thu, 9 Apr 2026 17:28:26 +0200 Message-ID: <20260409152839.2894434-7-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234923 From: Martin Jansa fixes systemd-systemctl-native on hosts with glibc-2.43: In file included from ../sources/systemd-systemctl-257.9/src/basic/errno-list.c:13: src/basic/errno-to-name.h:71:23: error: initialized field overwritten [-Werror=override-init] 71 | [EFSBADCRC] = "EFSBADCRC", | ^~~~~~~~~~~ src/basic/errno-to-name.h:71:23: note: (near initialization for ?errno_names[74]?) src/basic/errno-to-name.h:114:26: error: initialized field overwritten [-Werror=override-init] 114 | [EFSCORRUPTED] = "EFSCORRUPTED", | ^~~~~~~~~~~~~~ src/basic/errno-to-name.h:114:26: note: (near initialization for ?errno_names[117]?) Signed-off-by: Martin Jansa --- meta/recipes-core/systemd/systemd.inc | 4 ++- ...ilter-out-EFSBADCRC-and-EFSCORRUPTED.patch | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index 761660f2c8..f41acc029d 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc @@ -17,6 +17,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ SRCREV = "5e38d199a623563698ab4a69acbbe3afa9135198" SRCBRANCH = "v257-stable" -SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV}" +SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV} \ + file://0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch \ +" CVE_PRODUCT = "systemd" diff --git a/meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch b/meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch new file mode 100644 index 0000000000..5673175cb1 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch @@ -0,0 +1,34 @@ +From fb146f6d2c5118410fd19907651fd8f7310bf69e Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Tue, 24 Feb 2026 20:19:45 +0900 +Subject: [PATCH] errno-list: filter out EFSBADCRC and EFSCORRUPTED + +These are introduced in kernel v7.0. + +Upstream-Status: Backport [https://github.com/systemd/systemd/commit/3cfb16998808a6ec8012a6120d0a82f0e1a0c8bb] +Signed-off-by: Martin Jansa +--- + src/basic/generate-errno-list.sh | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/basic/generate-errno-list.sh b/src/basic/generate-errno-list.sh +index f756b2e020..491fa1b6e3 100755 +--- a/src/basic/generate-errno-list.sh ++++ b/src/basic/generate-errno-list.sh +@@ -3,9 +3,13 @@ + set -eu + set -o pipefail + +-# In kernel's arch/parisc/include/uapi/asm/errno.h, ECANCELLED and EREFUSED are defined as aliases of +-# ECANCELED and ECONNREFUSED, respectively. Let's drop them. ++# In kernel's arch/parisc/include/uapi/asm/errno.h, The following aliases are defined: ++# ECANCELLED → ECANCELED ++# EREFUSED → ECONNREFUSED ++# EFSBADCRC → EBADMSG ++# EFSCORRUPTED → EUCLEAN ++# Let's drop them. + + ${1:?} -dM -include errno.h - X-Patchwork-Id: 85687 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A451FF31E31 for ; Thu, 9 Apr 2026 15:28:57 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.134996.1775748529698874188 for ; Thu, 09 Apr 2026 08:28:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=JicOIn/n; spf=pass (domain: gmail.com, ip: 209.85.128.42, mailfrom: martin.jansa@gmail.com) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-488b3f8fa2bso13366265e9.1 for ; Thu, 09 Apr 2026 08:28:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748528; x=1776353328; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2pLeKwuoLTNcWYbm9YnR0/7UbTev0LGrYg19VSbGH7w=; b=JicOIn/n3n6bm7sP2Gq94tMvwUDcTlfLbXoH4XayGo8dFqyhGQq98w8IFihYJl8Dm6 XwM2JIYpl+5nHQWP81S5KGm431elq4nvn3vw1FLQj1+CP+9lCBODj/XYD3tsgFEus2QO raTD6rCvM1Cu08toU87WL3f9d0qeiPiyGhX0bebs+gG53oF9YSuNkTv8TvpFbCffcHpv cDi6nmCgdUjxNMQNl7rzq72C6Fd0rf9C3DebQibxHWDPqnpDVFyH+yZSyakmPm1T/Mmu R5CBOY8/uQr8lPXUWDq1I11zxRPi3jrQ33rWmyjlJOhlzQTeZKMB0/f7H1rQr76aC3jY wMVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748528; x=1776353328; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2pLeKwuoLTNcWYbm9YnR0/7UbTev0LGrYg19VSbGH7w=; b=g9Pwo6Pv+OIghlDIia+MigQgvg44JIaI6uc1gYAJfy2CAuMvojuEcaxIYAPCC4bNhd AxKEyA190igtVkhUGdMuOWlEWja/QbSMRZK+Bu3SbMEAkH2zg2f3gfdn42cqKYNosTY9 TnxSdAsdfcXMvKkHYTFOvDKe8fNJ+0EBwYIlR3wIALXN86xEMhr9BpdjaRh50M5LheHg an37k9zN+zP/gay/q/fR6Ev4jfAurOtLM/kbJlc7TXuAq2WPYOz3KULR/hXfkOQ/dqk4 PgUgPPBQh0Djaf1yFWfNOnZ2fyb6gy/wWdAkPq6CGoXa6kCMzRmytlL6B9Wesr51yCoh qpQw== X-Gm-Message-State: AOJu0YwCdui4qvQkLSSVkS+VO0d8qrZqqCLpnu0Tjunbp0PxuxVIZWEt yMB8RQ6AhB36J7kTtsYwkzQtzqOQZDp2rUhBNIoFX6iq3JNVrazoHvLvSVxpXg== X-Gm-Gg: AeBDievQN1WG6MLjfoGH9Ky6zGWpMvhmemElQ/J68FNKQyeQmhNnufZCEs9wDHNwxE+ pGiq1i2jvlCVya3OVzDMamNTS/cIFbwBdfgfhTZR3TltNRXKOHJ6vIokZkoN/Wh3H6++paRB8zh tK+IwFYCDAvwR2EIQpozmgG/V6hRcqm8zHq2c/jqaN0GO0UiQXFbxhZ21B60ii7yWGsaULfhBlB XH8wOezUVBGjx7DsipHp+3/UoCZgwUChTfH74smfgNb7N+kr8u64YBjImqDwuQnBgkiCEZqFx4F 1uBVrfa6nmPkQL/tyOSmVoRzhfvphvfVtYLJ2kfWCS/FAhkk8dzc/7BhGd2IAg3wywQTE4DXfVn CNxeXL6QHyP98zn3wLpmjwfPF/PgUm4V3VA5I4/QCoSlKP/hq8Wx8FZxLVBprR48YBLKcNA6nqm je4ENSdGbLP96TfxL9OEozf4UG2w== X-Received: by 2002:a05:6000:4b0a:b0:43b:a16b:ee69 with SMTP id ffacd0b85a97d-43d595cf8c2mr5650814f8f.24.1775748527868; Thu, 09 Apr 2026 08:28:47 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e1fe0b0sm70075622f8f.0.2026.04.09.08.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:47 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa , Mathieu Dubois-Briand , Richard Purdie Subject: [whinlatter][PATCH 8/9] gcc: backport a fix for building with gcc-16 Date: Thu, 9 Apr 2026 17:28:27 +0200 Message-ID: <20260409152839.2894434-8-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234924 From: Martin Jansa Fixes: https://errors.yoctoproject.org/Errors/Details/905192/ when building on host with gcc-16 Signed-off-by: Martin Jansa Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-15.2.inc | 1 + ...dy-Make-it-buildable-by-C-11-to-C-26.patch | 257 ++++++++++++++++++ 2 files changed, 258 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc/0028-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..69eff3621d 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://0028-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/0028-libcody-Make-it-buildable-by-C-11-to-C-26.patch b/meta/recipes-devtools/gcc/gcc/0028-libcody-Make-it-buildable-by-C-11-to-C-26.patch new file mode 100644 index 0000000000..431facb011 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc/0028-libcody-Make-it-buildable-by-C-11-to-C-26.patch @@ -0,0 +1,257 @@ +From 0ffe3c9af4e5d5468df742512b6e930fe7039230 Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +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 + + * 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. + +Signed-off-by: Martin Jansa +Upstream-Status: Backport [07a767c7a50d1daae8ef7d4aba73fe53ad40c0b7] +--- + 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 ae69d190cb77..147fecdbe500 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 &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 &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 &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 &words) + // OK or ERROR + Packet OKResponse (std::vector &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 &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 789ce9e70b75..93bce93aa94d 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 ++constexpr char S2C (char8_t const (&s)[I]) ++{ ++ static_assert (I == 2, "only single octet strings may be converted"); ++ return s[0]; ++} ++#else + template + 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 &&v) + : vector (std::move (v)), cat (VECTOR), code (c) + { +diff --git a/libcody/server.cc b/libcody/server.cc +index e2fa069bb933..c18469fae843 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; From patchwork Thu Apr 9 15:28:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 85686 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACF97F31E28 for ; Thu, 9 Apr 2026 15:28:57 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.134997.1775748530496466952 for ; Thu, 09 Apr 2026 08:28:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=S78BJBxj; spf=pass (domain: gmail.com, ip: 209.85.221.51, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-43cfd96354aso651402f8f.1 for ; Thu, 09 Apr 2026 08:28:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1775748529; x=1776353329; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kuD2t07dqSiyQbPAoL4L3Ck2fIgIeMA5gwuBViFd0co=; b=S78BJBxjEvTHFfsgOp5s34VrFJZtmHs+a/ojHdNewD8wtXorkjeD78LpiHJis4z9V4 c4ZOTxoDHC/OefCRR542dgL5XEwmGwMUeqVGQpi01ZQGs0cJ1mnA9WPQoOnDSF3GLiFZ NbgpoaC+SaKRAuLGEOc56ziH+Y5WLpZF4zAZ5+rafTYtlHCCMyqoEE4MeCLLzj189Rrv 3EyCpUu4PljWsZwMyg3pq2fby5Fgnk+hgWpR8eCfxtmhn9o3o/BwtlM1mxSjhyrMv2o6 fRvwf9b1TJc58fv4UN5mP3L+S1Ixi9uufsWjAWN+cTxLmJ+e7aEemZY8RpJqx6ItruFB 4fvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775748529; x=1776353329; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kuD2t07dqSiyQbPAoL4L3Ck2fIgIeMA5gwuBViFd0co=; b=gq6aCgSYdmieXqAVgZB99Uy19kefbjVVsdf+a/H5qKoHJYpHbTBLDoImIoaSM1V/Fw FM95ViC2aGqe+DbuqlTvGRythS6CF9rHOX3uuZgLooAs19pbx3JO6zXwLOhZMC76Y9ya arQDZgntS1ZqXYnAO3NXudprEOFCb3JNQ+DQ8sJK+6w9nxsCdvCEnbG2zvx3OXvr+ju+ ofTCHvX0aJbXEpwduj0hxFjS8F8W428cSG+PZ4r2Xusj7EOAQMpWW5TuGZEVP7iiWtPn O6sH4I9Xd4oqMN3NfKAF+0g/Xt6kqHSTykVFXbfhBJRfVAXcYNC2Wc1h6tNvJ1zWYVTg rXiA== X-Gm-Message-State: AOJu0YxOgz44ei3c83OCEhnxnmi/XMH4vgpA/px4n/G6PWoVFTyqSxtt hzQ99KyVg7OZsIdg4Y/5yi2ks0GRUuX04RvvbCUc8xVQjGPK5dH6TbYBYGsOMA== X-Gm-Gg: AeBDies7I7dyp95Z2MySxB4teJRzFh+NXhvGQFGT748i3u54D7QxHuvAGs+uFH67a0i ad/SX/Jg1cvBjcbp5bQWaP1nXjEVTY0RcTKlkshU2TtrBKcsk7Qi7X5SnClDZ1Ekd1cJq2vGmjN GSrlQXnTE7hZguelPZ5scuvQ8xbVwVtOkEH082DbjV5tLaRoPzreT31ibM1IzqGHirma68frRze +YEAkUfJ/WDX+eGtrrUQJJOMnsfUnH01E9XQ7P26AhUZ8WpxXpbpV2xIkf45crZTlh9a4aPaQQt zhNfvibhGqjNz6UhzzQGCTXaLqjXmVhtr/C5Odsfj0R9gwT2pXv8EJSD3b/9JPnNs2lBfeNSi98 eF0g50Qv6uwC0O7Cgu5kBESGcj9dF65/PfN0o20FnuQ1zerR6Z3rjGSFpPTEMP5OXP9DIeR52ML nbwTasMK6h44MwIGKw+9Gs7EqObQ== X-Received: by 2002:a05:6000:400a:b0:43d:578:586f with SMTP id ffacd0b85a97d-43d292d3562mr38600897f8f.25.1775748528720; Thu, 09 Apr 2026 08:28:48 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43d1e4d27a8sm68813125f8f.17.2026.04.09.08.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2026 08:28:48 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 9/9] binutils: backport patch to fix build with glibc-2.43 on host Date: Thu, 9 Apr 2026 17:28:28 +0200 Message-ID: <20260409152839.2894434-9-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260409152839.2894434-1-martin.jansa@gmail.com> References: <20260409152839.2894434-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Apr 2026 15:28:57 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234925 From: Martin Jansa Fixes: ../../../gprofng/libcollector/linetrace.c: In function ‘__collector_ext_line_install’: ../../../gprofng/libcollector/linetrace.c:219:45: error: expected identifier before ‘_Generic’ 219 | if (java_follow_env != NULL && CALL_UTIL (strstr)(java_follow_env, COLLECTOR_JVMTI_OPTION)) | ^~~~~~ ../../../gprofng/libcollector/linetrace.c:219:34: note: in expansion of macro ‘CALL_UTIL’ 219 | if (java_follow_env != NULL && CALL_UTIL (strstr)(java_follow_env, COLLECTOR_JVMTI_OPTION)) | ^~~~~~~~~ Signed-off-by: Martin Jansa --- .../binutils/binutils-2.45.inc | 1 + ...tect-against-standard-library-macros.patch | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0022-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..f5456c0b0f 100644 --- a/meta/recipes-devtools/binutils/binutils-2.45.inc +++ b/meta/recipes-devtools/binutils/binutils-2.45.inc @@ -39,6 +39,7 @@ SRC_URI = "\ file://0015-CVE-2025-11081.patch \ file://0016-CVE-2025-11082.patch \ file://0017-CVE-2025-11083.patch \ + file://0022-gprofng-protect-against-standard-library-macros.patch \ file://CVE-2025-11414.patch \ file://CVE-2025-11412.patch \ file://CVE-2025-11413.patch \ diff --git a/meta/recipes-devtools/binutils/binutils/0022-gprofng-protect-against-standard-library-macros.patch b/meta/recipes-devtools/binutils/binutils/0022-gprofng-protect-against-standard-library-macros.patch new file mode 100644 index 0000000000..0fa0a93991 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0022-gprofng-protect-against-standard-library-macros.patch @@ -0,0 +1,31 @@ +From 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab +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. + +Upstream-Status: Backport [2.46 5f66aee7f4bec7a2d8378034116f5e5c3dc50f41] +Signed-off-by: Martin Jansa +--- + 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().