Re: Clang as default compiler November 4th

From: David Chisnall <theraven_at_FreeBSD.org>
Date: Tue, 11 Sep 2012 08:58:23 +0100
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.  

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_at_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_at_
>   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
Received on Tue Sep 11 2012 - 05:58:39 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:30 UTC