From owner-freebsd-ports@FreeBSD.ORG Tue Oct 29 12:34:26 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 19F8DD78 for ; Tue, 29 Oct 2013 12:34:26 +0000 (UTC) (envelope-from freebsd@grem.de) Received: from mail.grem.de (outcast.grem.de [213.239.217.27]) by mx1.freebsd.org (Postfix) with SMTP id 78AC4231C for ; Tue, 29 Oct 2013 12:34:25 +0000 (UTC) Received: (qmail 57519 invoked by uid 89); 29 Oct 2013 12:34:24 -0000 Received: from unknown (HELO bsd64.grem.de) (mg@grem.de@194.97.158.66) by mail.grem.de with ESMTPA; 29 Oct 2013 12:34:24 -0000 Date: Tue, 29 Oct 2013 13:34:24 +0100 From: Michael Gmelin To: Dimitry Andric Subject: Re: Build C++ based packages using C++11 Message-ID: <20131029133424.391625c3@bsd64.grem.de> In-Reply-To: References: <20131028195708.53325afe@bsd64.grem.de> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.18; amd64-portbld-freebsd9.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-ports@freebsd.org list" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2013 12:34:26 -0000 On Tue, 29 Oct 2013 00:16:17 +0100 Dimitry Andric wrote: > On 28 Oct 2013, at 19:57, Michael Gmelin wrote: > > Now that most ports build ok with clang, are there any steps planned > > towards supporting C++11 and libc++ in the ports tree? I'm thinking > > of flags like NEEDS_CPP98, NEEDS_CPP11 etc. With C++14 at the > > horizon I expect more problems with ports depending on C++11 and > > even though mixing standard libraries and language revisions might > > build in many cases, it can lead to terrible problems at run time. > > Aren't the Mozilla ports already doing something like this now? (See > https://developer.mozilla.org/en-US/docs/Using_CXX_in_Mozilla_code for > their specific needs.) > > -Dimitry > I was thinking more of building the entire stack using C++11 (libc++ requires it anyway). To give you an example I know personally, the port devel/ice provides a bigger feature set if C++11 is available. If it's used, it's advised to also build dependencies (e.g. databases/db5) using C++11 as well, to make sure symbols and exception handling works properly. So if developing a software that uses Ice and C++11 features, which in turn requires to build all C++ port dependencies (including Ice and others commonly used like boost-libs) using C++11, it really trickles down to be able to build all ports using the current version of the standard. This is a lot of work (many ports have minor issues that can be corrected easily, some are more complicated). The way I would approach this is to set up poudriere to build the entire tree using clang++ -std=c++11 -stdlib=libc++ and then start dealing with the fallout, fixing smaller problems immediately (or make the maintainers fix them) and mark ports that are to hard to fix as "NEEDS_CPP98" or something like this. Comments? -- Michael Gmelin