system-cxx-std-lib: Add support for FreeBSD libcxxrt doesn't work on OpenBSD
@blackgnezdo reports:
Sadly, this is not working on OpenBSD (whereas the previous version did). A fix which makes configure
succeed would be to add:
diff --git a/m4/fp_find_cxx_std_lib.m4 b/m4/fp_find_cxx_std_lib.m4
index 24f78d0a6f..09f4524d89 100644
--- a/m4/fp_find_cxx_std_lib.m4
+++ b/m4/fp_find_cxx_std_lib.m4
@@ -75,6 +75,7 @@ EOF
case $CXX_STD_LIB_FLAVOUR in
c++)
try_libs "-lc++ -lc++abi" "libc++.so" "c++ c++abi" || \
+ try_libs "-lc++ -lc++abi -lpthread" "libc++.so" "c++ c++abi pthread" || \
try_libs "-lc++ -lcxxrt" "libc++.so" "c++ cxxrt" ||
AC_MSG_ERROR([Failed to find C++ standard library]) ;;
stdc++)
but I'm uncertain if it's a great idea to effectively replicate some behaviors baked into platform-dependent clang code.