From: Yoann Congal Date: Thu, 20 Mar 2025 13:40:09 +0000 (+0100) Subject: sanity: Check if the C++ toolchain supports --std=gnu++20 X-Git-Tag: 2025-04-walnascar~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19004950ad56;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git sanity: Check if the C++ toolchain supports --std=gnu++20 This is needed to build nodejs from meta-oe. Check this early to avoid an error later in the build. Fixes [YOCTO #15804] Signed-off-by: Yoann Congal Signed-off-by: Richard Purdie --- diff --git a/meta/classes-global/sanity.bbclass b/meta/classes-global/sanity.bbclass index d415611e3d8..192582b82ec 100644 --- a/meta/classes-global/sanity.bbclass +++ b/meta/classes-global/sanity.bbclass @@ -804,6 +804,11 @@ def check_sanity_version_change(status, d): # Check if linking with lstdc++ is failing status.addresult(check_cpp_toolchain_flag(d, "-lstdc++")) + # Check if the C++ toochain support the "--std=gnu++20" flag + status.addresult(check_cpp_toolchain_flag(d, "--std=gnu++20", + "An error occurred during checking the C++ toolchain for '--std=gnu++20' support. " + "Please use a g++ compiler that supports C++20 (e.g. g++ version 10 onwards).")) + def sanity_check_locale(d): """ Currently bitbake switches locale to en_US.UTF-8 so check that this locale actually exists.