From f18b4289d7391bce788a8ff3fea7be82e18c4b8f Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Wed, 4 Feb 2026 19:59:01 +0100 Subject: [PATCH] package/meson: fix build error Buildroot commit eb1f160b7a08537fdfeb0800b9240a497f4237ac bumped meson to 1.10.0, this release includes upstream commit https://github.com/mesonbuild/meson/commit/35193dd8e4f2a24ae689eeb8d01a2c3bcca11025 This commit caused build errors https://github.com/mesonbuild/meson/issues/15497#issuecomment-3812709660 which were fixed by an upstream commit to the master branch: https://github.com/mesonbuild/meson/commit/c1db93be859b360b64fe20d49a286278b56df64e This patch adds to upstream fix to buildroot. Fixes: https://autobuild.buildroot.net/results/aab/aaba3d6a9d55c3e8030d3e3487bf93074a4deac1/ Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- ...not-fail-if-only-the-build-machine-u.patch | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/meson/0003-ninjabackend-do-not-fail-if-only-the-build-machine-u.patch diff --git a/package/meson/0003-ninjabackend-do-not-fail-if-only-the-build-machine-u.patch b/package/meson/0003-ninjabackend-do-not-fail-if-only-the-build-machine-u.patch new file mode 100644 index 0000000000..22f9ace42e --- /dev/null +++ b/package/meson/0003-ninjabackend-do-not-fail-if-only-the-build-machine-u.patch @@ -0,0 +1,45 @@ +From c1db93be859b360b64fe20d49a286278b56df64e Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 3 Feb 2026 12:56:36 +0100 +Subject: [PATCH] ninjabackend: do not fail if only the build machine uses C++ + +This is caused by the introduction of the cpp_importstd option; while +target_uses_import_std() tries to protect from the option not existing, +this does not work if cpp_importstd exists but build.cpp_importstd does +not, and get_option_for_target() wants to look at the latter. + +Just return false on a KeyError for simplicity. + +Fixes: #15497 +Signed-off-by: Paolo Bonzini + +Upstream: https://github.com/mesonbuild/meson/commit/c1db93be859b360b64fe20d49a286278b56df64e + +Signed-off-by: Bernd Kuhls +--- + mesonbuild/backend/ninjabackend.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py +index 42f24d47d..e0aaa39c4 100644 +--- a/mesonbuild/backend/ninjabackend.py ++++ b/mesonbuild/backend/ninjabackend.py +@@ -3297,11 +3297,11 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485''')) + def target_uses_import_std(self, target: build.BuildTarget) -> bool: + if 'cpp' not in target.compilers: + return False +- if 'cpp_importstd' not in self.environment.coredata.optstore: +- return False +- if self.environment.coredata.get_option_for_target(target, 'cpp_importstd') == 'false': ++ try: ++ if self.environment.coredata.get_option_for_target(target, 'cpp_importstd') == 'true': ++ return True ++ except KeyError: + return False +- return True + + def handle_cpp_import_std(self, target: build.BuildTarget, compiler): + istd_args = [] +-- +2.47.3 +