WIP notes on issues building FreeBSD/MIPS with modern toolchains

Ed's wipbsd branch

MIPS errors, building with in-tree Clang + lld 5.0.0

ld: error: target ABI 'n64' is incompatible with 'o32': otusfw_init.o

error: unknown target CPU 'octeon+'

sys/dev/rt/if_rt.c:298:12: error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]                                                                                                                          
sys/dev/rt/if_rt.c:301:11: error: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]                                                                                                                          

cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang integrated assembler command failed due to signal (use -v to see invocation)

cc: error: unknown argument: '-fno-tree-loop-optimize'
cc: error: unknown argument: '-mno-branch-likely'
cc: error: optimization flag '-finline-limit=20000' is not supported [-Werror,-Wignored-optimization-argument]
cc: error: optimization flag '-finline-limit=20000' is not supported [-Werror,-Wignored-optimization-argument]

error: unknown target triple 'mipsn32-unknown-freebsd12.0', please use -triple or -arch

sys/mips/rmi/msgring.h:213:7: error: unknown instruction

2462:sys/mips/mips/exception.S:195:2: error: la used to load 64-bit address
...

18876:ld: error: target floating point ABI '-msoft-float' is incompatible with '-mdouble-float': /scratch/tmp/emaste/obj-clang500/mips.mips64elhf/scratch/tmp/emaste/freebsd/sys/boot/mips/uboot/../../ficl/libficl.a(vm.o)
18877:ld: error: target floating point ABI '-msoft-float' is incompatible with '-mdouble-float': /scratch/tmp/emaste/obj-clang500/mips.mips64elhf/scratch/tmp/emaste/freebsd/sys/boot/mips/uboot/../../ficl/libficl.a(loader.o)
...

EdMaste/MIPS (last edited 2018-06-22 01:58:22 by EdMaste)