Clang/LLVM enabled builds for mips/mips64

Sean Bruno sbruno at freebsd.org
Mon Aug 29 15:09:38 UTC 2016


Made some excellent progress over the last few weeks.  Here's a quick
status update.  I can boot(then crash) a mips64 kernel in QEMU via the
MALTA64 kernconf.  I can buildworld for mips32, but the kernel fails.

QEMU MALTA64 kernel crash:
http://people.freebsd.org/~sbruno/malta64_qemu_crash.txt

MIPS32 buildkernel failure:
http://people.freebsd.org/~sbruno/malta32_buildkernel.txt

Clang/LLVM patches that you need to apply when using and external toolchain:
https://reviews.llvm.org/D23652
https://reviews.llvm.org/D23795
https://reviews.llvm.org/D23497

Minor Patch to enable inline ASM by default for mips targets:
http://people.freebsd.org/~sbruno/clang_mips_default_ias.diff

Build the FreeBSD tree in my project branch, its got a few things
changed to make it easier to build/test:
https://svnweb.freebsd.org/base/projects/mips64-clang/

Use a make.conf(change XCC/XCPP/XCXX to *your* build of clang)
MALLOC_PRODUCTION=y
NO_WERROR=y
TARGET=mips
TARGET_ARCH=mips64
KERNCONF=MALTA64
XCC=/home/sbruno/bsd/clang/build/bin/clang
XCPP=/home/sbruno/bsd/clang/build/bin/clang-cpp
XCXX=/home/sbruno/bsd/clang/build/bin/clang++
XCFLAGS=-Wno-typedef-redefinition -Wno-pointer-sign
-Wno-expansion-to-defined -Wno-address-of-packed-member -msoft-float -fpic

Use a src.conf:
WITHOUT_CLANG="YES"
WITHOUT_CLANG_EXTRAS="YES"
WITHOUT_CLANG_FULL="YES"
WITHOUT_CLANG_BOOTSTRAP="YES"
WITHOUT_GCC="YES"
WITHOUT_GDB="YES"
WITHOUT_TESTS="YES"
WITHOUT_RESCUE="YES"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20160829/b30e8e04/attachment.sig>


More information about the freebsd-mips mailing list