Author: jhb
Date: Tue Jan 16 01:05:04 2018
New Revision: 328036
URL: https://svnweb.freebsd.org/changeset/base/328036

Log:
  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

Modified:
  head/Makefile.libcompat

Modified: head/Makefile.libcompat
==============================================================================
--- head/Makefile.libcompat     Tue Jan 16 00:47:53 2018        (r328035)
+++ head/Makefile.libcompat     Tue Jan 16 01:05:04 2018        (r328036)
@@ -35,18 +35,18 @@ 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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to