From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 05:54:05 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 2186A106564A; Tue, 11 Sep 2012 05:54:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D0F7714DBA0; Tue, 11 Sep 2012 05:54:04 +0000 (UTC) Message-ID: <504ED1FC.3090608@FreeBSD.org> Date: Mon, 10 Sep 2012 22:54:04 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120907 Thunderbird/15.0 MIME-Version: 1.0 To: toolchain@freebsd.org References: <20120910211207.GC64920@lor.one-eyed-alien.net> In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> X-Enigmail-Version: 1.4.4 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@freebsd.org, freebsd-ports@FreeBSD.org Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 05:54:05 -0000 -----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-----