Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Sep 2012 22:54:04 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        toolchain@freebsd.org
Cc:        Brooks Davis <brooks@freebsd.org>, current@freebsd.org, freebsd-ports@FreeBSD.org
Subject:   Re: Clang as default compiler November 4th
Message-ID:  <504ED1FC.3090608@FreeBSD.org>
In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net>
References:  <20120910211207.GC64920@lor.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

As of last week, 4,680 ports out of 23,857 failed to build with clang on
9-amd64. That's almost a 20% failure rate. Until we have better support
for either building ports with clang, or have better support for the
idea of a "ports compiler," this change is premature. The ports are an
important part of the FreeBSD Operating _System_, and pulling the
trigger on the default compiler before the ports problems are addressed
robustly seems like a big fat FU.

That said, I agree that this issue needs to be addressed. In fact, 9
months before the release of 9.0 I said on the internal committers list
that there was no point in making a new release until we had thoroughly
addressed both the default compiler for the base, and resolving the
"ports compiler" issue. While there has been some movement on the
former, there has been nothing done on the latter for years now, even
though everyone agrees that it is an important issue.

I'd like to request that rather than moving the default compiler
prematurely that you call for volunteers to address the problems with
the ports. Both the issues of fixing more ports to build correctly with
clang, and the issue of defining a "ports compiler" version of gcc (and
appropriate infrastructure) for those that can't. Once those issues are
resolved there would not be any further obstacles to moving the default.
Until they are, the change is premature.

Doug


On 09/10/2012 14:12, Brooks Davis wrote:
> [Please confine your replies to toolchain@freebsd.org to keep the thread
> on the most relevant list.]
> 
> For the past several years we've been working towards migrating from
> GCC to Clang/LLVM as our default compiler.  We intend to ship FreeBSD
> 10.0 with Clang as the default compiler on i386 and amd64 platforms.  To
> this end, we will make WITH_CLANG_IS_CC the default on i386 and amd64
> platforms on November 4th.
> 
> What does the mean to you?
> 
>  * When you build world after the default is changed /usr/bin/cc, cpp, and
>    c++ will be links to clang.
> 
>  * This means the initial phase of buildworld and "old style" kernel
>    compilation will use clang instead of gcc.  This is known to work.
> 
>  * It also means that ports will build with clang by default.  A major
>    of ports work, but a significant number are broken or blocked by
>    broken ports. For more information see:
>      http://wiki.freebsd.org/PortsAndClang
> 
> What issues remain?
> 
>  * The gcc->clang transition currently requires setting CC, CXX, and CPP
>    in addition to WITH_CLANG_IS_CC.  I will post a patch to toolchain@
>    to address this shortly.
> 
>  * Ports compiler selection infrastructure is still under development.
> 
>  * Some ports could build with clang with appropriate tweaks.
> 
> What can you do to help?
> 
>  * Switch (some of) your systems.  Early adoption can help us find bugs.
> 
>  * Fix ports to build with clang.  If you don't have a clang system, you
>    can use the CLANG/amd64 or CLANG/i386 build environments on
>    redports.org.
> 
> tl;dr: Clang will become the default compiler for x86 architectures on 2012-11-04
> 
> -- Brooks
> 


- -- 

    I am only one, but I am one.  I cannot do everything, but I can do
    something.  And I will not let what I cannot do interfere with what
    I can do.
			-- Edward Everett Hale, (1822 - 1909)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJQTtH8AAoJEFzGhvEaGryEU3gIAJ3X2EHDCVnkC/CYTMOkceho
KS6qVcQK4OCbbG+8TKkjrHNdiBO7ZuJKxfvr/TZC1zNKc8wYBlWo3s07wCHmu8Nj
OP8UwTMKumnljnYlRanQiLO9iAZKwGfI2gdxJTb5YABN2StRMXnD17Yyic6pw090
7l+cQw3iJAI8vbO4su33HJOhru0o4XLodbazHXFc6RjabAfXfuk1W6V0PfAodVC9
ZUGbF4WA7F0sJOEVuohmSk8ICHQRzTWofpdvCTlhHc1XYTaQ9u/dLGUp1C8g/BUG
CJQua7wsBdf4VgsvlYBxTAOEpURqot0Ild7zQL+9vZtf7cGCsfalpwBWzQ9J/Wk=
=gRkN
-----END PGP SIGNATURE-----



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