浏览代码

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]

(From OE-Core rev: 19004950ad5691ef51f7fcf946558bd0de561403)

Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Yoann Congal 2 月之前
父节点
当前提交
5d2ed873c8
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      meta/classes-global/sanity.bbclass

+ 5 - 0
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.