GSoC: Making ports work with clang

Volodymyr Kostyrko c.kworr at gmail.com
Sun May 30 11:58:17 UTC 2010


02.05.2010 10:25, Yuri wrote:

> Having tried clang++ I have a feeling that it's not quite ready to be a
> generic c++ compiler.
> It crashes a lot, fails on many quite simple c++ patterns. Very immature.
> Don't you feel it's too early to start project like you are going to
> given the state of clang with c++?

This is just a question of time. Two month ago was the time after three 
month ago. And clang proceeds rapidly.

> You will just keep stumbling upon various problems with various ports
> and maybe will make 30% of c++ ports build with it at best.

Let me spit out my own stats on ports. I have 574 ports installed, E17, 
xfce, postgresql etc.

1. 23% of _my_ ports doesn't require any compiler. They are fonts, 
script, meta-ports etc.
2. 60% of _my_ ports compiles and works with current devel/clang.

This means I have only something like 17% ports to deal with.

Above this ports major breakages were:

1. __dso not found after link. Some symbols seems to be omitted from 
libraries and linking of plugins fails badly.
2. Assembler errors. Xorg has some in x11-servers/xorg-server 
x11-drivers/xf86-video-vesa x11-drivers/xf86-video-ati, everything else 
compiles and works.
3. Big bunch of compile errors or config errors. This means incorrectly 
written code, like not correctly declaring variables. This also means 
some automake stupidities like testing c++ compiler with c style code - 
for example clang++ refuses to compile "int main(void) {}".
4. Some ports specify that thay need at least gcc 3.3.
5. Some ports needs --dumpspecs.

And only small number of ports really require some real investigations.

audio/libmad - distorted sound
lang/python26 - compiling any gir dumps core
textproc/expat2 - dbus dumps core at launch

I think there are more. For example on clang-compiled ports gtk apps 
have problems with rendering final frame, but this is not a gtk failure, 
rather some lib gtk depends on.

And this all data is not current. It's one month old. Since then 
dumpspecs was implemented. And maybe some other problems begone - I just 
have not enough time to look at this thoroughly.

-- 
Sphinx of black quartz judge my vow.



More information about the freebsd-hackers mailing list