From owner-freebsd-current@FreeBSD.ORG Sun Jan 25 15:39:18 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 965FA4A1 for ; Sun, 25 Jan 2015 15:39:18 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FC0B16B for ; Sun, 25 Jan 2015 15:39:16 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::79cb:885c:d74b:842b] (unknown [IPv6:2001:7b8:3a7:0:79cb:885c:d74b:842b]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8D6B25C2E; Sun, 25 Jan 2015 16:39:07 +0100 (CET) Subject: Re: How to get the source code of FreeBSD-Clang? Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_96F42615-3601-4EDC-A750-5187EA97B308"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 From: Dimitry Andric In-Reply-To: Date: Sun, 25 Jan 2015 16:39:11 +0100 Message-Id: References: To: Yue Chen X-Mailer: Apple Mail (2.1993) Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jan 2015 15:39:18 -0000 --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 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--