From owner-svn-src-head@freebsd.org Thu Nov 19 03:11:21 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B19E5A30083; Thu, 19 Nov 2015 03:11:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC891E11; Thu, 19 Nov 2015 03:11:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tAJ3BKd2071135; Thu, 19 Nov 2015 03:11:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tAJ3BKxC071134; Thu, 19 Nov 2015 03:11:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201511190311.tAJ3BKxC071134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 19 Nov 2015 03:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291053 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Nov 2015 03:11:21 -0000 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"