package/meson: fix build error
PATCH 1/1 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/
--- ...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
package/meson/0003-ninjabackend-do-not-fail-if-only-the-build-machine-u.patch new file +45 -0
@@ -0,0 +1,45 @@ +From c1db93be859b360b64fe20d49a286278b56df64e Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini <[email protected]> +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 <[email protected]> + +Upstream: https://github.com/mesonbuild/meson/commit/c1db93be859b360b64fe20d49a286278b56df64e + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + 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 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines · Bernd Kuhls
Buildroot commit
eb1f160b7a08537fdfeb0800b9240a497f4237acbumped meson to 1.10.0, this release includes upstream commit
https://github.com/mesonbuild/meson/commit/35193dd8e4f2a24ae689eeb8d01a2c3bcca11025This 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
Quoted 6 lines
This patch adds to upstream fix to buildroot.
Fixes:
https://autobuild.buildroot.net/results/aab/aaba3d6a9d55c3e8030d3e3487bf93074a4deac1/Signed-off-by Bernd Kuhls <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot