Date: Thu, 11 Jan 2018 19:24:44 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r327841 - head Message-ID: <201801111924.w0BJOicg089230@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu Jan 11 19:24:44 2018 New Revision: 327841 URL: https://svnweb.freebsd.org/changeset/base/327841 Log: Allow MIPS lib32 to build with clang. Don't try to set -march as clang doesn't permit use of the O32 ABI with newer CPU microarchitectures like 'mips3'. In addition, clang doesn't permit the O32 ABI with the default N64 target, so use an explicit O32 -target for clang. Sponsored by: DARPA / AFRL Modified: head/Makefile.libcompat Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Thu Jan 11 19:08:43 2018 (r327840) +++ head/Makefile.libcompat Thu Jan 11 19:24:44 2018 (r327841) @@ -35,10 +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 empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -march=mips3 .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} +.endif .endif LIB32CPUFLAGS+= -mabi=32 LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801111924.w0BJOicg089230>