Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2011 14:55:13 +0100
From:      Marius Strobl <marius@alchemy.franken.de>
To:        Guido Falsi <mad@madpilot.net>
Cc:        Doug Barton <dougb@freebsd.org>, freebsd-ports@freebsd.org
Subject:   Re: Compiling ports in a post-9.0-RELEASE world
Message-ID:  <20110313135513.GA65945@alchemy.franken.de>
In-Reply-To: <20110313120507.GA75195@megatron.madpilot.net>
References:  <4D7BED01.6000506@FreeBSD.org> <20110313120507.GA75195@megatron.madpilot.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Mar 13, 2011 at 01:05:07PM +0100, Guido Falsi wrote:
> On Sat, Mar 12, 2011 at 02:00:33PM -0800, Doug Barton wrote:
> > Howdy,
> > 
> > As many of you are no doubt already aware, much work has been
> > undertaken to make clang the default compiler for the src tree
> > starting with 9.0-RELEASE. It is not 100% certain that this change
> > will be made, but it's looking more likely every day.

Actually, originally it was outlined that GCC would stay the
default in FreeBSD 9 in any case:
http://wiki.freebsd.org/201005ToolchainSummitSummary
"GCC will continue to be built and installed as cc/c++ by default."
IIRC this statement so far was repeated on mailing lists.

> > 
> > This raises an interesting question for how to deal with compiling
> > ports after 9.0 is released. So far there are 2 main ideas for how
> > to deal with this:
> > 
> > 1. Fix all ports to compile with both gcc 4.2 (for RELENG_[78]) and clang.
> 
> This perhaps would be bst, but...(see below)
> 
> > 2. Adopt an official "ports compiler," which would likely be one of
> > the gcc versions from the ports tree itself, and update all ports to
> > work with it.
> 
> Since most of the software in the ports tree tends to be quite linux
> or gcc centric I think 2 is the only viable option.
> 
> BTW I'd suggest a variation to 2. I think some option like "CLANG_SAFE"
> or "USE_CLANG"(just saying, perhaps a better name can be found)
> should be added to the infrastructure so, on 9.x and newer systems,
> maintainer can sign that their port does build using the system
> compiler. Obviously for ports having dependencies, especially
> libraries, some extra testing should be performed to make sure
> depending ports, which could use a different compiler, link correctly.
> 

Given that clang so far only is a viable alternative on x86 if at
all option 2 or the proposed variation of it would also be a
necessary precursor for !x86, assuming that eventually clang will
be the default for x86 (or whatever architectures it then is en
par with GCC). For !x86 CLANG_SAFE or whatever then would be a
NOP. Wasn't there a GSoC project aimed at implementing something
like that in the ports infrastructure?

Marius




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110313135513.GA65945>