[cfe-dev] Fwd: Clang builds a working Linux Kernel (Boots to RL5 with SMP, networking and X, self hosts)

Erik Cederstrand erik at cederstrand.dk
Wed Oct 27 05:56:59 PDT 2010


Den 27/10/2010 kl. 13.36 skrev Paul Davey:

> sorry forgot to send to list.
> 
> On Wed, Oct 27, 2010 at 8:06 PM, Erik Cederstrand <erik at cederstrand.dk> wrote:
>> 
>> Den 26/10/2010 kl. 23.30 skrev David Chisnall:
>> 
>>> On 26 Oct 2010, at 19:13, Erik Cederstrand wrote:
>>> 
>>>> I think the BSD folks may be interested. Which license covers SUN ld?
>>>> 
>>>> FreeBSD use GNU ld currently but don't like the GPLv3 license that binutils has switched to, so wew're at binutils v 2.15 (soon 2.17). gold has always been GPLv3. LLVM has llvm-ld, but there were problems with it last time I asked here (with native code generation, I think). There's a linker planned for the elftoolchain project, but it's still only a Trac ticket as far as I know.
>>>> 
>>>> I'd like to play with LTO for FreeBSD builds using Clang, but the options are limited as far as I can see.
>>> 
>>> 
>>> Sun ld is CDDL, and I believe that the FreeBSD policy is still that CDDL stuff should only be used for optional parts of the base system.  Whether this includes developer tools is not clear.  OpenBSD has less strict requirements for developer tools than for the rest of the base system, but I'm not sure that FreeBSD is quite as relaxed.
>>> 
>>> That said, the version of GNU ld in the base system is quite old, and the alternatives are either GPLv3 or CDDL, so I'm not sure which is less unattractive to the FreeBSD team.  The third alternative is to write a new linker, which is a possibility if someone's willing to pay for it, but probably not something anyone (even me) would do entirely for fun.
>> 
>> Now that LLVM is supposedly able to emit ELF object files without assistance from external tools, what is holding back llvm-ld from being used to produce the final executable? Is llvm-ld a priority of the MC subproject?
>> 
> as far as i remember llvm-ld is a script, it either produces a script
> to run the bitcode file with a stub executable, or in native mode it
> uses llc, the system assembler and linker to produce an executable, it
> was a convenience tool not a linker.

Thanks. I just realized it's also stated in the manual for llvm-ld (http://llvm.org/cmds/llvm-ld.html): "Native code generation is performed by converting the linked bitcode into native assembly (.s) or C code and running the system compiler (typically gcc) on the result."

>   I wish we would develop a linker
> in this project, the guy who goes by the name Bigcheese on the IRC
> channel is beginning work on one AFAIK

Indeed. Here's the announcement of the Object File Library: http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-September/thread.html#34412

I'm looking forward to this!

Erik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1928 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101027/2256f463/attachment.bin>


More information about the cfe-dev mailing list