I was curious if it's possible to build Linux kernel without GNU toolchain (gcc+autotools).

I found out that it is possible: after applying patches from llvm.linuxfoundation.org, it was possible to build Linux kernel with clang. GNU linker was used.

The alternative to ld is gold which is also part of GNU binutils. Popular musl+clang toolchain ELLCC also uses GNU binutils.

There are more alternatives: lld (no stable releases), mclinker (no stable releases).

Does alternative to GNU binutils exist? Probably, building on Mac OS X or FreeBSD doesn't involve GNU tools.

  • man ld for FreeBSD: "ld - The GNU linker". (But: wiki.freebsd.org/BSDToolchain)
    – Mat
    Sep 21, 2015 at 11:35
  • Why would you want to build Linux with anything but GNU? I can think of reasons for building BSD with alternative toolchains, but that's another matter.
    – ams
    Sep 21, 2015 at 12:34
  • I can use makepp or pymake (or maybe something else?), they claim to be compatible with GNU Make.
    – tpimh
    Sep 22, 2015 at 0:24

2 Answers 2


As of 2018 lld seems mature enough to be used in production, not 100% compatible with bfd, but can be used as drop-in replacement in most cases.

Update: recently, a new linker appeared, and it is under active development: mold.


There is the UNIX linker that is available freely in source (under the CDDL). The sourcecode was made available with the OpenSolaris project.

Due to several deficits and bugs the GNU linker is no alternative to the UNIX ld on Solaris. On the other side, it may be that linking on Linux depends on the gld deviations (e.g. on different command line options and on an incompatible map-file implementation).

You may like to check the OpenSolaris sources, e.g. at http://schillix.sourceforge.net The linker sources are at usr/src/cmd/sgs sgs stands for software generation system AFAIR.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .