Re: Clang as default compiler November 4th
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
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 6 之 86 篇):