Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Enabling clang/llvm for MIPS?

16 views
Skip to first unread message

Adrian Chadd

unread,
Jul 21, 2013, 2:42:30 PM7/21/13
to freebs...@freebsd.org, freebsd...@freebsd.org
Hiya,

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?

Thanks,


-Adrian
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"

Dimitry Andric

unread,
Jul 21, 2013, 4:05:19 PM7/21/13
to Adrian Chadd, freebsd...@freebsd.org, freebs...@freebsd.org

On Jul 21, 2013, at 20:42, Adrian Chadd <adr...@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.
>
> 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

Warner Losh

unread,
Jul 21, 2013, 5:06:58 PM7/21/13
to Dimitry Andric, Adrian Chadd, freebsd...@freebsd.org, freebs...@freebsd.org

On Jul 21, 2013, at 2:04 PM, Dimitry Andric wrote:

>
> On Jul 21, 2013, at 20:42, Adrian Chadd <adr...@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.
>>
>> 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?

make buildworld WITH_CLANG=t WITHOUT_CLANG_FULL=t WITHOUT_CLANG_IS_CC=t

Warner
0 new messages