How to get the source code of FreeBSD-Clang?

Dimitry Andric dim at FreeBSD.org
Sun Jan 25 15:39:18 UTC 2015


O 25 Jan 2015, at 06:16, Yue Chen <ycyc321 at gmail.com> wrote:
> 
> When I use the original versions (even 3.4.1) of LLVM/Clang to compile
> FreeBSD kernel, it always has problems.
> 
> Since I need to modify something in LLVM source and then build the kernel,
> where can I get the FreeBSD-friendly Clang/LLVM source code?

See the contrib/llvm/patches directory for the list of patches that you
need to apply.  Not all of these are strictly needed to compile just a
kernel, but it is safest to just apply them all.

For 3.4.1, you can use the set available here:

  https://svnweb.freebsd.org/base/stable/10/contrib/llvm/patches/

Alternatively, you can compile the kernel using:

  make buildkernel WERROR= MK_FORMAT_EXTENSIONS=no

which should fix any errors that were emitted because of -Werror.

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20150125/d4da4ae2/attachment.sig>


More information about the freebsd-current mailing list