remove libstdc++ dependency from libc++ on freebsd 9.x

Dimitry Andric dim at FreeBSD.org
Mon May 23 23:22:27 UTC 2016


On 23 May 2016, at 11:02, kang joni <kangjoni76 at gmail.com> wrote:
> 
> I need to backport c++11project to BSD 9.x. How to remove libstdc++
> dependency from libc++ and libc++abi as freebsd 10.x did?
> I'm stuck on this. The llvm docs is unclear.

On FreeBSD 9.x, C++11 is not supported out of the box.  As I mentioned
in another thread, currently the only easy way is to build and install
world with the following in /etc/src.conf:

WITH_CLANG_IS_CC=y
WITH_LIBCPLUSPLUS=y

This will make clang the default compiler, and install libc++ headers
and libraries on the system.

Afterwards, you can use -stdlib=libc++ -std=c++11 in the CXXFLAGS for
your project.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20160524/1a866de7/attachment.sig>


More information about the freebsd-ports mailing list