Libc++ Has Landed

Written by Michael Larabel in BSD on 24 May 2012 at 01:30 AM EDT. 1 Comment
BSD
The LLVM-spawned libc++ standard C++ library has now landed within FreeBSD.

As I reported on Phoronix earlier this month and was widely-carried by other news outlets after that, FreeBSD 10 will using the LLVM/Clang compiler and deprecate GCC. The BSD camp wants to get rid of the GPL-licensed compiler from the Free Software Foundation and replace it with the younger but promising Apple-sponsored and BSD-style-licensed LLVM and Clang; see the earlier Phoronix articles on the topic for greater detail.

As the latest step in this default compiler migration and throwing out GPL code from BSD, a message arrived on the FreeBSD-Stable mailing list on Wednesday entitled libc++ has landed. Being merged into FreeBSD 9-STABLE is libc++ and its dependencies. This change will first be found in FreeBSD 9.1, which is due to be branched soon.

Due to libc++ being written in C++11, and the FreeBSD base relying upon an outdated GCC release, the C++ standard library can only be built if using Clang to begin with. The libc++ introduction also requires a very recent libc implementation.

The libstdc++ replacement library from the LLVM project is dual-licensed under the MIT and UIUC licenses. The library aims to be compatible with the C++0x/C++11 standard, provide fast execution, minimal memory use, and fast compile times. The libc++ implementation also aims to be ABI compatible with the reference libstdc++ library from GCC when it comes to low-level features. Additional libc++ information is available from libcxx.llvm.org.

It was also one year ago that PathScale gave FreeBSD and NetBSD a new C++ run-time. This code donation from the PathScale compiler company was in the form of the libcxxrt C++ run-time. This run-time was done under the two-clause BSD license in order to ditch the GPL-licensed libsubc++ library.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week