From a1554bba0562ad32af2ef8f614d5e57d3ba6c69d Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Tue, 16 Jan 2018 01:05:04 +0000 Subject: [PATCH] Check for GCC first rather than clang in the MIPS lib32 rules. This works around a bug with X_COMPILER_TYPE and permits mips64 to build again with in-tree gcc as well as clang and external gcc. Sponsored by: DARPA / AFRL --- Makefile.libcompat | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.libcompat b/Makefile.libcompat index afc1be1df06..dda1a29f50d 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -35,19 +35,19 @@ LIB32WMAKEFLAGS= \ OBJCOPY="${XOBJCOPY}" .elif ${TARGET_ARCH:Mmips64*} != "" -.if ${WANT_COMPILER_TYPE} == clang || \ - (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang) -.if ${TARGET_ARCH:Mmips64el*} != "" -LIB32CPUFLAGS= -target mipsel-unknown-freebsd12.0 -.else -LIB32CPUFLAGS= -target mips-unknown-freebsd12.0 -.endif -.else +.if ${WANT_COMPILER_TYPE} == gcc || \ + (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) .if empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -march=mips3 .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} .endif +.else +.if ${TARGET_ARCH:Mmips64el*} != "" +LIB32CPUFLAGS= -target mipsel-unknown-freebsd12.0 +.else +LIB32CPUFLAGS= -target mips-unknown-freebsd12.0 +.endif .endif LIB32CPUFLAGS+= -mabi=32 LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips