problems when compiling FreeBSD world with clang

hi

I am just trying to compile FreeBSD userland with clang and the most
frequent lacking feature seems to be

error: cannot codegen this initializer list with designators yet

ie. that

struct foo {
   int a;
   int b;
};

main() {
   struct foo bar = {
      .a = 1,
      .b = 2,
   };
}

does not work. I did not find any mention of this in the bugzilla or tests.
Should I file a bug? Is anyone working on this? what's the status? please
include this test in the tests directory at least :slight_smile:

the second most frequent one is the lack of support for wide strings, ie. L"foo",
any info on that?

thnx for answering me!

roman

p.s. I have to admit that the progress over the last month (from Oct 18, to Nov 18)
is astonishing... you compile some more programs (csh, stty...), a big THANK YOU!

Hi Roman,

The issue with designated initializers is well known, although not
currently being worked on. See:
http://llvm.org/bugs/show_bug.cgi?id=2749

When I get a moment to do http://llvm.org/bugs/show_bug.cgi?id=3034
(document C status) this will be high on the list.

Wide string support is probably more easily tackled, although it
doesn't look like we have PR for it and no one is working on it as far
as I know. Feel free to file a PR on the issue, preferably with simple
test cases for the cases you care about.

Its great that you are trying to push clang over such a large code
base; thanks for trying this and reporting the issues you find! Do you
have numbers on how many programs we are building (and out of how
many)? And for the programs we build, are you trying to run them
through any kind of tests to make sure we are compiling them
correctly?

- Daniel

Hi Roman,

The issue with designated initializers is well known, although not
currently being worked on. See:
http://llvm.org/bugs/show_bug.cgi?id=2749

When I get a moment to do http://llvm.org/bugs/show_bug.cgi?id=3034
(document C status) this will be high on the list.

Wide string support is probably more easily tackled, although it
doesn't look like we have PR for it and no one is working on it as far
as I know. Feel free to file a PR on the issue, preferably with simple
test cases for the cases you care about.

great :slight_smile: I am doing just that

Its great that you are trying to push clang over such a large code
base; thanks for trying this and reporting the issues you find! Do you
have numbers on how many programs we are building (and out of how
many)? And for the programs we build, are you trying to run them
through any kind of tests to make sure we are compiling them
correctly?

currently I am trying to build freebsd userland/kernel with clang

witten ~# ls /bin/ /sbin/ /usr/bin/ /usr/sbin/ | wc -l
     890

there's a experimental build of FreeBSD ports (some 19000 programs) in queue

I am going to post a detailed report on these experiments. it just does not
make much sense now when 50 program fail and 35 because of 2 missing features
(the ones I just reported about - note that the numbers are guesses :slight_smile: )

hth

roman

Daniel Dunbar schrieb:

Its great that you are trying to push clang over such a large code
base; thanks for trying this and reporting the issues you find! Do you
have numbers on how many programs we are building (and out of how
many)? And for the programs we build, are you trying to run them
through any kind of tests to make sure we are compiling them
correctly?

Speaking of large code bases, I'm running daily scan-builds of DragonFly world & kernel. For results and indication of which files it crashes on, you can find the results here (last 3 days):

http://yoyodyne.ath.cx/ccc-analyze/

LLVM & clang are usually upgraded every 2-3 days or so.

Have fun,