tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Importing LLVM/Clang



Hi all,
as some of you might be aware, I have been working on NetBSD integration
of LLVM and Clang for some time now. Executive summary is that
NetBSD/x86 has been usable with LLVM/Clang for a long time now and most
packages in pkgsrc work fine with it as well. There are a few
problematic cases depending on extensions of either the GCC frontend
(like the ability to create nested functions in C) or the run time
environment (like creating STL streams from FILE instances). I think
from the high impact packages, only OpenJDK and OOo/LibreOffice are very
relevant.

At this point, I would like to import the LLVM and Clang sources to make
it easier to test the new toolchain without needing SVN. I would still
strongly request that *no* local changes are made. I will discuss a
NetBSD branch in the relevant upstream repositories that can be used for
merging "temporary" / "local" changes for import in our tree.

In principle, NetBSD i386 and amd64 can be switched to LLVM/Clang now.
There are a few places in the kernel where the integrated assembler can
not be used yet, so GNU as is still needed. The ABI questions around
libgcc need some careful investigation to ensure that the transistion
can be as smooth as possible.

ARM and MIPS need someone with platform knowledge to polish the rough
edges, but they are pretty mature in term of code generation, at least
for modern versions. Can't comment on the integrated assembler state
here.

PowerPC can create static binaries with some smaller problems in libc
(union arguments for variadic functions). Integrated assembler covers
almost all instructions with a few privileged ones missing for the
kernel. PowerPC64 has strong support from IBM due to customer demand.

SPARC and SPARC64 have basic code generation, but need a lot more love
to be usable.

Joerg


Home | Main Index | Thread Index | Old Index