Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2015 16:39:11 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Yue Chen <ycyc321@gmail.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: How to get the source code of FreeBSD-Clang?
Message-ID:  <A3CBF97B-689F-44B8-A0D8-4405C455BC18@FreeBSD.org>
In-Reply-To: <CAKtBrB7A2yPFF2iby7h7CmDcrR=dUQpOTFXV9gGypwGWVsUp1g@mail.gmail.com>
References:  <CAKtBrB7A2yPFF2iby7h7CmDcrR=dUQpOTFXV9gGypwGWVsUp1g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_96F42615-3601-4EDC-A750-5187EA97B308
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii

O 25 Jan 2015, at 06:16, Yue Chen <ycyc321@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


--Apple-Mail=_96F42615-3601-4EDC-A750-5187EA97B308
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.26

iEYEARECAAYFAlTFDiIACgkQsF6jCi4glqN3vACguBkboPIoHfsz/o52D60Gssqw
HboAn0BxwLwt1MBXDnrMmm4UxwtvD6cl
=y9yf
-----END PGP SIGNATURE-----

--Apple-Mail=_96F42615-3601-4EDC-A750-5187EA97B308--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A3CBF97B-689F-44B8-A0D8-4405C455BC18>