Index: lib/libc/mips/string/bcmp.S =================================================================== --- lib/libc/mips/string/bcmp.S (revision 287720) +++ lib/libc/mips/string/bcmp.S (working copy) @@ -55,7 +55,14 @@ LEAF(bcmp) .set noreorder - blt a2, 16, small # is it worth any trouble? +// clang doen't know how to do blt, manually do it for clang + .set noat +// blt a2, 16, small # is it worth any trouble? + li $1, 16 + slt $1, a2, $1 + bne $1, $0, small + .set at + xor v0, a0, a1 # compare low two bits of addresses and v0, v0, 3 PTR_SUBU a3, zero, a1 # compute # bytes to word align address Index: lib/libc/mips/string/bzero.S =================================================================== --- lib/libc/mips/string/bzero.S (revision 287720) +++ lib/libc/mips/string/bzero.S (working copy) @@ -54,7 +54,12 @@ LEAF(bzero) .set noreorder - blt a1, 3*SZREG, smallclr # small amount to clear? + .set noat + //blt a1, 3*SZREG, smallclr # small amount to clear? + li $1, 3*SZREG + slt $1, a1, $1 + bne $1, $0, smallclr + .set at PTR_SUBU a3, zero, a0 # compute # bytes to word align address and a3, a3, SZREG-1 beq a3, zero, 1f # skip if word aligned Index: share/mk/src.opts.mk =================================================================== --- share/mk/src.opts.mk (revision 287720) +++ share/mk/src.opts.mk (working copy) @@ -215,7 +215,7 @@ __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .elif ${__T} == "aarch64" || ${__T} == "amd64" || ${__TT} == "arm" || \ - ${__T} == "i386" + ${__T} == "i386" || ${__T} == "mips" || ${__T} == "mips64" # On x86 and arm, clang is enabled, and will be installed as the default cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX