toolchain-funcs.eclass: update tc-get-cxx-stdlib for C++20

<ciso646> is gone from C++20, so use <version> for >= C++20.

See https://stackoverflow.com/a/31658120.

Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2025-04-12 16:43:49 +01:00
parent 064d419ded
commit 66e18dd329

View File

@@ -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 <ciso646>
local code='
#if __cplusplus >= 202002L
#include <version>
#else
#include <ciso646>
#endif
#if defined(_LIBCPP_VERSION)
HAVE_LIBCXX