From 2703431699d6c348286614a81107040455c878e4 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Sun, 20 Nov 2022 18:33:13 +0000 Subject: [PATCH] Clang should use _GLIBCXX_RELEASE To determine libstdc++ version. Fixes https://github.com/boostorg/config/issues/455 --- include/boost/config/stdlib/libstdcpp3.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/config/stdlib/libstdcpp3.hpp b/include/boost/config/stdlib/libstdcpp3.hpp index 75d33ccc..5a9f444e 100644 --- a/include/boost/config/stdlib/libstdcpp3.hpp +++ b/include/boost/config/stdlib/libstdcpp3.hpp @@ -139,6 +139,13 @@ // #ifdef __clang__ +#ifdef _GLIBCXX_RELEASE +# define BOOST_LIBSTDCXX_VERSION (_GLIBCXX_RELEASE * 10000 + 100) +#else +// +// We figure out which gcc version issued this std lib +// by checking which headers are available: +// #if __has_include() # define BOOST_LIBSTDCXX_VERSION 120100 #elif __has_include() @@ -170,6 +177,7 @@ #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40300 #endif +#endif // // If BOOST_HAS_FLOAT128 is set, now that we know the std lib is libstdc++3, check to see if the std lib is // configured to support this type. If not disable it: