From owner-freebsd-current@FreeBSD.ORG Sun Jul 21 20:05:07 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1CFBAEF2; Sun, 21 Jul 2013 20:05:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) by mx1.freebsd.org (Postfix) with ESMTP id D67AEFDF; Sun, 21 Jul 2013 20:05:06 +0000 (UTC) Received: from [192.168.1.106] (249-086-128-083.dynamic.caiway.nl [83.128.86.249]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 560235C5A; Sun, 21 Jul 2013 22:04:56 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Enabling clang/llvm for MIPS? From: Dimitry Andric In-Reply-To: Date: Sun, 21 Jul 2013 22:04:55 +0200 Content-Transfer-Encoding: 7bit Message-Id: <333C8EE2-1ADC-41EE-A474-9CE12B6E11EA@FreeBSD.org> References: To: Adrian Chadd X-Mailer: Apple Mail (2.1508) Cc: freebsd-current@freebsd.org, freebsd-mips@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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, 21 Jul 2013 20:05:07 -0000 On Jul 21, 2013, at 20:42, Adrian Chadd wrote: > I'd like to start doing test builds of the mips stuff (specifically > mips4kc, mips24k and mips74k) on freebsd-head with clang/llvm. > > What changes are needed to the makefile framework to enable this? In share/mk/bsd.own.mk, modify these parts: # Clang is only for x86, powerpc and little-endian arm right now, by default. .if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL .elif ${__T} == "arm" || ${__T} == "armv6" __DEFAULT_YES_OPTIONS+=CLANG # GCC is unable to build the full clang on arm, disable it by default. __DEFAULT_NO_OPTIONS+=CLANG_FULL .else __DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL .endif # Clang the default system compiler only on little-endian arm and x86. .if ${__T} == "amd64" || ${__T} == "arm" || ${__T} == "armv6" || \ ${__T} == "i386" __DEFAULT_YES_OPTIONS+=CLANG_IS_CC .else __DEFAULT_NO_OPTIONS+=CLANG_IS_CC .endif The first part enables building clang, the second makes it the default compiler. I take it you only want the first one for now? -Dimitry