Date: Sun, 21 Jul 2013 15:06:43 -0600 From: Warner Losh <imp@bsdimp.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: freebsd-current@freebsd.org, freebsd-mips@freebsd.org Subject: Re: Enabling clang/llvm for MIPS? Message-ID: <685512EE-BEB7-4D42-95D1-AC0454C90AB9@bsdimp.com> In-Reply-To: <333C8EE2-1ADC-41EE-A474-9CE12B6E11EA@FreeBSD.org> References: <CAJ-Vmonyiv1ieXJq0cyXhZPyqFtPsZ6y67oLCqvzjN3NO2iJLg@mail.gmail.com> <333C8EE2-1ADC-41EE-A474-9CE12B6E11EA@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jul 21, 2013, at 2:04 PM, Dimitry Andric wrote: >=20 > On Jul 21, 2013, at 20:42, Adrian Chadd <adrian@freebsd.org> wrote: >> I'd like to start doing test builds of the mips stuff (specifically >> mips4kc, mips24k and mips74k) on freebsd-head with clang/llvm. >>=20 >> What changes are needed to the makefile framework to enable this? >=20 > In share/mk/bsd.own.mk, modify these parts: >=20 > # Clang is only for x86, powerpc and little-endian arm right now, by = default. > .if ${__T} =3D=3D "amd64" || ${__T} =3D=3D "i386" || ${__T:Mpowerpc*} > __DEFAULT_YES_OPTIONS+=3DCLANG CLANG_FULL > .elif ${__T} =3D=3D "arm" || ${__T} =3D=3D "armv6" > __DEFAULT_YES_OPTIONS+=3DCLANG > # GCC is unable to build the full clang on arm, disable it by default. > __DEFAULT_NO_OPTIONS+=3DCLANG_FULL > .else > __DEFAULT_NO_OPTIONS+=3DCLANG CLANG_FULL > .endif > # Clang the default system compiler only on little-endian arm and x86. > .if ${__T} =3D=3D "amd64" || ${__T} =3D=3D "arm" || ${__T} =3D=3D = "armv6" || \ > ${__T} =3D=3D "i386" > __DEFAULT_YES_OPTIONS+=3DCLANG_IS_CC > .else > __DEFAULT_NO_OPTIONS+=3DCLANG_IS_CC > .endif >=20 > The first part enables building clang, the second makes it the default > compiler. I take it you only want the first one for now? make buildworld WITH_CLANG=3Dt WITHOUT_CLANG_FULL=3Dt = WITHOUT_CLANG_IS_CC=3Dt Warner=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?685512EE-BEB7-4D42-95D1-AC0454C90AB9>