[PATCH] D43166: Add default C++ ABI libname and include paths for FreeBSD

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 10 15:17:40 PST 2018


dim created this revision.
dim added reviewers: emaste, EricWF, mclow.lists.
Herald added subscribers: krytarowski, mgorny.

As noted in a discussion about testing the LLVM 6.0.0 release candidates
(with libc++) for FreeBSD, many tests turned out to fail with
"exception_ptr not yet implemented".  This was because libc++ did not
choose the correct C++ ABI library, and therefore it fell back to the
`exception_fallback.ipp` header.

Since FreeBSD 10.x, we have been using libcxxrt as our C++ ABI library,
and its headers have always been installed in /usr/include/c++/v1,
together with the (system) libc++ headers.  (Older versions of FreeBSD
used GNU libsupc++ by default, but these are now unsupported.)

Therefore, if we are building libc++ for FreeBSD, set:

- `LIBCXX_CXX_ABI_LIBNAME` to "libcxxrt"
- `LIBCXX_CXX_ABI_INCLUDE_PATHS` to "/usr/include/c++/v1"

by default.


Repository:
  rCXX libc++

https://reviews.llvm.org/D43166

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -136,6 +136,9 @@
   elseif (APPLE)
     set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
     set(LIBCXX_CXX_ABI_SYSTEM 1)
+  elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+    set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
+    set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")
   else()
     set(LIBCXX_CXX_ABI_LIBNAME "default")
   endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43166.133772.patch
Type: text/x-patch
Size: 465 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180210/44b6cc79/attachment.bin>


More information about the cfe-commits mailing list