CLang

FreeBSD CLang/LLVM项目终于进svn了

| *nix and Win32 Kernel | #CLang | #FreeBSD | #LLVM

如题。

不过这一次因为-CURRENT code slush的缘故,应该不会在 8.0-CURRENT 里面引入了(Ed在svn里面建立了另一个branch来做)。我想从各方面考虑,9.0-RELEASE里面正式砍掉gcc那一套东西应该不会是很困难的事情。传统上 FreeBSD 的代码用到了很多gcc的扩展,因此可能还需要一段时间。

阅读全文…( 本文约 197 字,阅读大致需要 1 分钟 )

GCC运行环境豁免条款再次狠狠地打了苹果的耳光

| Development | #clang | #FSF | #GPL | #llvm

今年 1 月 27 日发表的 《GCC运行环境豁免条款 (英文版)》 再次狠狠地打了苹果的耳光。

原先的豁免条款如下:

// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.

阅读全文…( 本文约 549 字,阅读大致需要 2 分钟 )

Progress on LLVM clang

| *nix and Win32 Kernel | #clang | #FreeBSD | #gcc | #llvm

As some of you already know, FreeBSD, along with some other Open Source projects, is moving away from GCC due to GPLv3. From a technology perspective, this also makes sense since the (likely) candidate, BSD-style licensed, LLVM based clang, a C compiler, is making reasonably good progress.

So, what should we expect from LLVM or clang?

Here is a good comparison between GCC and clang. Despite GCC is popular, considerably more mature, and supports more languages (especially C++, which clang’s support is incomplete at this moment), clang provides cleaner AST (Abstract Syntax Tree), much more modularized (if you take a look at GCC’s history, Richard Stallman intentionally made GCC’s code not reusable in other software), provided much more information for optimizer, is much faster and use much less memory, etc.

For FreeBSD, currently, clang can compile its kernel with only very few tweaks.

阅读全文…( 本文约 315 字,阅读大致需要 2 分钟 )