On 3/24/2016 3:39 PM, Warner Losh wrote: > >> On Mar 24, 2016, at 4:36 PM, Bryan Drewery <[email protected]> wrote: >> >> Is there any problem with forcing -std=c++11 for all CXX/LIB_CXX builds >> now? We do this when using an external GCC since it doesn't default to >> the c++11 standard quite yet. As far as I understand, we require c++11 >> to build clang/libc++. >> >> It seems to be the problem at >> https://lists.freebsd.org/pipermail/freebsd-toolchain/2015-October/001757.html >> which I've fixed in an upcoming commit to properly pass -std=c++11 to >> the lib32 build in CXXFLAGS. > > Wouldn’t that break the spark and mips builds if we did it always? They are > the > last stragglers to not have a working, fully vetted clang in the tree. >
When building with external GCC we're forcing it to use libc++ which uses static_assert which doesn't work without -std=c++11. The external GCC support now always forces -std=gnu++11 but I was testing with removing it. libatf blows up: > In file included from > /usr/obj/powerpc.powerpc64/root/git/freebsd/tmp/usr/include/c++/v1/ostream:137:0, > from > /root/git/freebsd/contrib/atf/atf-c++/detail/application.hpp:29, > from > /root/git/freebsd/contrib/atf/atf-c++/detail/application.cpp:26: > /usr/obj/powerpc.powerpc64/root/git/freebsd/tmp/usr/include/c++/v1/memory: In > member function 'void std::__1::default_delete<_Tp>::operator()(_Tp*) const': > /usr/obj/powerpc.powerpc64/root/git/freebsd/tmp/usr/include/c++/v1/memory:2514:13: > error: typedef '__t2514' locally defined but not used > [-Werror=unused-local-typedefs] > static_assert(sizeof(_Tp) > 0, "default_delete can not delete > incomplete type"); I stopped testing at this point. We've fixed it by always passing -std=gnu++11 to the entire build but then that ends up hiding other issues like that Static_assert in libcxxrt being misused. Not passing -std=c++11 to the lib32 build just happens to work because we don't normally build c++ libraries in it that don't otherwise force -std=c++11 (such as libc++ does now). -- Regards, Bryan Drewery
signature.asc
Description: OpenPGP digital signature
