Date: Thu, 19 Nov 2015 03:11:20 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291053 - head/share/mk Message-ID: <201511190311.tAJ3BKxC071134@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Thu Nov 19 03:11:20 2015 New Revision: 291053 URL: https://svnweb.freebsd.org/changeset/base/291053 Log: Fix mips CPUTYPE so that we can pass it through to gcc. Keep old CPUTYPEs around for compatibility. Also include a list of typical values for FreeBSD. # Split out from other changes in D4155 Differential Revision: https://reviews.freebsd.org/D4155 Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Thu Nov 19 02:39:46 2015 (r291052) +++ head/share/mk/bsd.cpu.mk Thu Nov 19 03:11:20 2015 (r291053) @@ -122,19 +122,18 @@ _CPUCFLAGS = -mcpu=${CPUTYPE} -mno-power . elif ${MACHINE_ARCH} == "powerpc64" _CPUCFLAGS = -mcpu=${CPUTYPE} . elif ${MACHINE_CPUARCH} == "mips" -. if ${CPUTYPE} == "mips32" -_CPUCFLAGS = -march=mips32 -. elif ${CPUTYPE} == "mips32r2" -_CPUCFLAGS = -march=mips32r2 -. elif ${CPUTYPE} == "mips64" -_CPUCFLAGS = -march=mips64 -. elif ${CPUTYPE} == "mips64r2" -_CPUCFLAGS = -march=mips64r2 -. elif ${CPUTYPE} == "mips4kc" -_CPUCFLAGS = -march=4kc -. elif ${CPUTYPE} == "mips24kc" -_CPUCFLAGS = -march=24kc -. endif +# mips[1234], mips32, mips64, and all later releases need to have mips +# preserved (releases later than r2 require external toolchain) +. if ${CPUTYPE:Mmips32*} != "" || ${CPUTYPE:Mmips64*} != "" || \ + ${CPUTYPE:Mmips[1234]} != "" +_CPUCFLAGS = -march=${CPUTYPE} +. else +# Default -march to the CPUTYPE passed in, with mips stripped off so we +# accept either mips4kc or 4kc, mostly for historical reasons +# Typical values for cores: +# 4kc, 24kc, 34kc, 74kc, 1004kc, octeon, octeon+, octeon2, octeon3, +# sb1, xlp, xlr +_CPUCFLAGS = -march=${CPUTYPE:S/^mips//} . elif ${MACHINE_ARCH} == "sparc64" . if ${CPUTYPE} == "v9" _CPUCFLAGS = -mcpu=v9 @@ -254,6 +253,9 @@ MACHINE_CPU = ssse3 sse3 MACHINE_CPU = sse3 . endif MACHINE_CPU += amd64 sse2 sse mmx +########## Mips +. elif ${MACHINE_CPUARCH} == "mips" +MACHINE_CPU = mips ########## powerpc . elif ${MACHINE_ARCH} == "powerpc" . if ${CPUTYPE} == "e500"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201511190311.tAJ3BKxC071134>