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

Paul Davey plmdvy at gmail.com
Wed Oct 27 04:36:18 PDT 2010


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.  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




More information about the cfe-dev mailing list