From 66e18dd329f4728409abced4138562a079b30ccd Mon Sep 17 00:00:00 2001 From: Sam James Date: Sat, 12 Apr 2025 16:43:49 +0100 Subject: [PATCH] toolchain-funcs.eclass: update tc-get-cxx-stdlib for C++20 is gone from C++20, so use for >= C++20. See https://stackoverflow.com/a/31658120. Signed-off-by: Sam James --- eclass/toolchain-funcs.eclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index ae21a18a14c23..baf032bbd4ecc 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -1156,7 +1156,12 @@ tc-enables-ssp-all() { # # If the library is not recognized, the function returns 1. tc-get-cxx-stdlib() { - local code='#include + local code=' +#if __cplusplus >= 202002L + #include +#else + #include +#endif #if defined(_LIBCPP_VERSION) HAVE_LIBCXX