From: martin.jansa@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Martin Jansa <martin.jansa@gmail.com>
Subject: [scarthgap][PATCH] cmake: backport a fix for gcc-16 on host
Date: Fri, 10 Apr 2026 10:49:13 +0200 [thread overview]
Message-ID: <20260410084913.3326967-1-martin.jansa@gmail.com> (raw)
From: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
.../cmake/cmake-native_3.28.3.bb | 1 +
...mpilation-with-gcc-16-devirtualizati.patch | 36 +++++++++++++++++++
meta/recipes-devtools/cmake/cmake_3.28.3.bb | 4 ++-
3 files changed, 40 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/cmake/cmake/0001-bootstrap-Fix-compilation-with-gcc-16-devirtualizati.patch
diff --git a/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb b/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb
index 7b250752d8..eecc2df538 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.28.3.bb
@@ -8,6 +8,7 @@ SRC_URI += "file://OEToolchainConfig.cmake \
file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
file://0001-CMakeLists.txt-disable-USE_NGHTTP2.patch \
file://CVE-2025-9301.patch \
+ file://0001-bootstrap-Fix-compilation-with-gcc-16-devirtualizati.patch \
"
LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl"
diff --git a/meta/recipes-devtools/cmake/cmake/0001-bootstrap-Fix-compilation-with-gcc-16-devirtualizati.patch b/meta/recipes-devtools/cmake/cmake/0001-bootstrap-Fix-compilation-with-gcc-16-devirtualizati.patch
new file mode 100644
index 0000000000..2f28e3a7ba
--- /dev/null
+++ b/meta/recipes-devtools/cmake/cmake/0001-bootstrap-Fix-compilation-with-gcc-16-devirtualizati.patch
@@ -0,0 +1,36 @@
+From 0f8fdfb55950e383d9780b875bc8d7213db8a42a Mon Sep 17 00:00:00 2001
+From: Brad King <brad.king@kitware.com>
+Date: Wed, 24 Sep 2025 12:02:37 -0400
+Subject: [PATCH] bootstrap: Fix compilation with gcc 16 devirtualization
+
+Avoid including a header for a subclass whose implementation is not
+compiled during bootstrap.
+
+Fixes: #27256
+
+Upstream-Status: Backport [v3.31.10 ea04e19daf7010781d0df980b9683a642093e381 https://gitlab.kitware.com/cmake/cmake/-/merge_requests/11243]
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+ Source/cmake.cxx | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Source/cmake.cxx b/Source/cmake.cxx
+index 636a0da5b8..0e05afb7a6 100644
+--- a/Source/cmake.cxx
++++ b/Source/cmake.cxx
+@@ -124,12 +124,12 @@
+ # include "cmExtraEclipseCDT4Generator.h"
+ # include "cmExtraKateGenerator.h"
+ # include "cmExtraSublimeTextGenerator.h"
+-#endif
+
+ // NOTE: the __linux__ macro is predefined on Android host too, but
+ // main CMakeLists.txt filters out this generator by host name.
+-#if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32)
+-# include "cmGlobalGhsMultiGenerator.h"
++# if (defined(__linux__) && !defined(__ANDROID__)) || defined(_WIN32)
++# include "cmGlobalGhsMultiGenerator.h"
++# endif
+ #endif
+
+ #if defined(__APPLE__)
diff --git a/meta/recipes-devtools/cmake/cmake_3.28.3.bb b/meta/recipes-devtools/cmake/cmake_3.28.3.bb
index 1841bfd1cf..f018ca21ff 100644
--- a/meta/recipes-devtools/cmake/cmake_3.28.3.bb
+++ b/meta/recipes-devtools/cmake/cmake_3.28.3.bb
@@ -11,7 +11,9 @@ SRC_URI:append:class-nativesdk = " \
file://cmake-setup.py \
file://environment.d-cmake.sh \
"
-SRC_URI += "file://CVE-2025-9301.patch"
+SRC_URI += "file://CVE-2025-9301.patch \
+ file://0001-bootstrap-Fix-compilation-with-gcc-16-devirtualizati.patch \
+"
LICENSE:append = " & BSD-1-Clause & MIT"
LIC_FILES_CHKSUM:append = " \
reply other threads:[~2026-04-10 8:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260410084913.3326967-1-martin.jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox