From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 07:58:39 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8959E106564A; Tue, 11 Sep 2012 07:58:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 1EF5F8FC15; Tue, 11 Sep 2012 07:58:35 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q8B7wSDj019847 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 11 Sep 2012 07:58:29 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> Date: Tue, 11 Sep 2012 08:58:23 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> To: toolchain@FreeBSD.org X-Mailer: Apple Mail (2.1278) Cc: current@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 07:58:39 -0000 I'd add one more thing that needs fixing: Clang should default to c89 mode when invoked as cc. I had a patch to = do this, but I seem to have misplaced it. I'll try to find or rewrite = it in the next couple of days. =20 A lot of the ports failures I saw were due to ports using cc as the = default C compiler (autoconf seems to select it) and then using GNU89 = inlining rules, so that they died with linker failures. Given that = POSIX deprecated cc in 1997, I'm quite tempted to say that we should = just remove it entirely and just have c89, c99 and c11 (which the spec = for cc says you should use instead), forcing people to explicitly select = their language dialect, but that's a bikeshed for another day. David On 10 Sep 2012, at 22:12, Brooks Davis wrote: > [Please confine your replies to toolchain@freebsd.org to keep the = thread > on the most relevant list.] >=20 > 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. >=20 > What does the mean to you? >=20 > * When you build world after the default is changed /usr/bin/cc, cpp, = and > c++ will be links to clang. >=20 > * This means the initial phase of buildworld and "old style" kernel > compilation will use clang instead of gcc. This is known to work. >=20 > * 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 >=20 > What issues remain? >=20 > * 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. >=20 > * Ports compiler selection infrastructure is still under development. >=20 > * Some ports could build with clang with appropriate tweaks. >=20 > What can you do to help? >=20 > * Switch (some of) your systems. Early adoption can help us find = bugs. >=20 > * 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. >=20 > tl;dr: Clang will become the default compiler for x86 architectures on = 2012-11-04 >=20 > -- Brooks