From owner-freebsd-stable@FreeBSD.ORG Wed May 23 09:32:58 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 229CA106567E for ; Wed, 23 May 2012 09:32:58 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id E77EA8FC1B for ; Wed, 23 May 2012 09:32:57 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust790.5-4.cable.virginmedia.com [86.26.15.23]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q4N9WEDF071226 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO) for ; Wed, 23 May 2012 09:32:57 GMT (envelope-from theraven@freebsd.org) From: David Chisnall Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: Wed, 23 May 2012 10:32:56 +0100 Message-Id: To: stable@freebsd.org Mime-Version: 1.0 (Apple Message framework v1257) X-Mailer: Apple Mail (2.1257) Cc: Subject: libc++ has landed X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2012 09:32:58 -0000 Hi Everyone, I have just finished merging libc++ and all of the things that it = depends on into 9-STABLE. Since 9.1 is due to branch Real Soon Now=99, = it would be good if it could see a bit of testing before then. Because = it uses C++11, libc++ will only work if built with clang, so it is = disabled in the default build for now. To build it, you will need to = add the following to your /etc/src.conf: CC=3Dclang CXX=3Dclang++ CPP=3Dclang-cpp WITH_LIBCPLUSPLUS=3Dyes You can then just make && make install in lib/libcxxrt and lib/libc++. = This requires a (very) recent libc, containing the xlocale APIs, so = you'll also need to reinstall lib/libc and include. If you want to try = mixing libstdc++ and libc++, then you will need to also recompile / = install libstdc++ from stable. This depends on some rtld-elf fixes, so = it's probably worth rebuilding world to make sure that you have = everything. =20 Once all of this is installed, there are two things you can test. The = simplest is the libstdc++ / libcxxrt combination. To do this, just add = this to /etc/libmap.conf: libsupc++.so.1 libcxxrt.so.1 This will use libcxxrt instead of libsupc++. These libraries implement = the low-level parts of C++ (RTTI, exceptions, and so on). The other = thing that you can try is compiling other C++ code using libc++. This = is trivial to do with clang++, just add -stdlib=3Dlibc++ to both your = CXXFLAGS and LDFLAGS. David=