delphij's Chaos

选择chaos这个词是因为~~实在很难找到一个更合适的词来形容这儿了……

03 Jun 2009

FreeBSD CLang/LLVM项目终于进svn了

如题。

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

包含CLang的FreeBSD -CURRENT可以在 projects/clangbsd/ checkout。包含 CLang 的 LLVM 预计将能够在今年9月正式发布。


Archived: 6 Comments

webinit.org | June 25, 2009 9:17 AM

It would be really good if it happens as soon as possible. GCC sometimes contaminates BSD core as well as Darwin..

cheers,

  • yxh

Haohui | June 26, 2009 3:44 AM

I’m pretty curious what GCC extension are used in FreeBSD? like regparam?

Do you guys only have C code? Clang does not work so well on C++ programs..

Xin LI replied to comment from Haohui | June 26, 2009 5:38 AM

Most GCC extensions required by FreeBSD are supported by LLVM/Clang. As for C++ support, since Clang and LLVM themselves are written in C++, it’s a must-have feature before we actually switch over to that combination. I think we will also need a BSD licensed assembler, linker and debugger in addition to the compiler.

Haohui | June 29, 2009 3:42 AM

Assembler like llc works pretty well on x86.

Writing yet another debugger does not take too much time, but nobody wants to reinvent the wheel since they have GDB. On the other hand, LLVM does not handle debug information very well during IPO, which is a very painful fact you have to accept.

So what you saying is there are not many C++ code in FreeBSD, but you only need a compiler which can bootstrap itself?

Xin LI replied to comment from Haohui | June 30, 2009 2:12 AM

Well, Marcel is developing a FreeBSD debugger, the reason behind this is that gdb is lacking of some love from GNU folks who are mostly Linux centric, in the past we have spend a painful amount of manpower to get GDB work right on FreeBSD, especially with threads, etc.

Speaking about C++, I think implementing full C++ support is required for the system compiler, and bootstraping the compiler itself is just a “side effect”. It is not permitted to replace something with significant regression in terms of functionality.

wsw | July 21, 2009 1:36 PM

llvm/clang是不是包含as,ld? 至少在i386/amd64下?还是就算base用了clang我们还离不开GNU的as,ld?