From owner-svn-src-all@freebsd.org Tue Oct 15 17:11:45 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36AE414E8EB; Tue, 15 Oct 2019 17:11:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46t25s0jBhz4XQ8; Tue, 15 Oct 2019 17:11:45 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F0AF721C65; Tue, 15 Oct 2019 17:11:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9FHBiA0005616; Tue, 15 Oct 2019 17:11:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9FHBgGB005607; Tue, 15 Oct 2019 17:11:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201910151711.x9FHBgGB005607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 15 Oct 2019 17:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353572 - in head/sys: conf mips/conf X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/sys: conf mips/conf X-SVN-Commit-Revision: 353572 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Oct 2019 17:11:45 -0000 Author: jhb Date: Tue Oct 15 17:11:42 2019 New Revision: 353572 URL: https://svnweb.freebsd.org/changeset/base/353572 Log: Update MIPS kernel builds to work with mips-gcc. - Use a default -march of mips64 on N64 and N32 kernels. - Set the endianness (via MIPS_ENDIAN) and ABI (via MIPS_ABI) in CFLAGS from MACHINE_ARCH. ARCH_FLAGS now only sets a different -march value if needed. - TRAMP_ARCH_FLAGS inherits MIPS_ENDIAN from MACHINE_ARCH but does not set the ABI since XLPN32 needs an N64 ABI for the trampoline loader. When TRAMP_ARCH_FLAGS is used it must set both -march and -mabi. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D22030 Modified: head/sys/conf/Makefile.mips head/sys/mips/conf/ERL head/sys/mips/conf/JZ4780 head/sys/mips/conf/MALTA64 head/sys/mips/conf/MALTA64EL head/sys/mips/conf/OCTEON1 head/sys/mips/conf/X1000 head/sys/mips/conf/XLP64 head/sys/mips/conf/XLPN32 head/sys/mips/conf/std.BERI Modified: head/sys/conf/Makefile.mips ============================================================================== --- head/sys/conf/Makefile.mips Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/conf/Makefile.mips Tue Oct 15 17:11:42 2019 (r353572) @@ -39,10 +39,16 @@ KERNLOADADDR?=0x80001000 # To be changed later TRAMPLOADADDR?=0x807963c0 -# We default to the MIPS32 ISA, if none specified in the -# kernel configuration file. +# We default to the MIPS32 ISA for O32 and MIPS64 ISA for N64 and N32 +# if none is specified in the kernel configuration file. +.if ${MACHINE_ARCH:Mmips64*} != "" || ${MACHINE_ARCH:Mmipsn32*} != "" +ARCH_FLAGS?=-march=mips64 +.else ARCH_FLAGS?=-march=mips32 +.endif +ARCH_FLAGS+=-mabi=${MIPS_ABI} EXTRA_FLAGS=-fno-pic -mno-abicalls -G0 -DKERNLOADADDR=${KERNLOADADDR} +EXTRA_FLAGS+=-${MIPS_ENDIAN} HACK_EXTRA_FLAGS=-shared Modified: head/sys/mips/conf/ERL ============================================================================== --- head/sys/mips/conf/ERL Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/ERL Tue Oct 15 17:11:42 2019 (r353572) @@ -21,7 +21,7 @@ ident ERL -makeoptions ARCH_FLAGS="-march=octeon+ -mabi=64" +makeoptions ARCH_FLAGS="-march=octeon+" makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1 makeoptions KERNLOADADDR=0xffffffff80100000 Modified: head/sys/mips/conf/JZ4780 ============================================================================== --- head/sys/mips/conf/JZ4780 Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/JZ4780 Tue Oct 15 17:11:42 2019 (r353572) @@ -12,7 +12,7 @@ cpu CPU_XBURST cpu CPU_MIPS4KC makeoptions KERNLOADADDR=0x80020000 -makeoptions ARCH_FLAGS="-EL -march=mips32r2" +makeoptions ARCH_FLAGS="-march=mips32r2" # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/MALTA64 Tue Oct 15 17:11:42 2019 (r353572) @@ -8,8 +8,6 @@ include "std.MALTA" machine mips mips64 -makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" - makeoptions KERNLOADADDR=0xffffffff80100000 options COMPAT_FREEBSD32 # Compatible with o32 binaries Modified: head/sys/mips/conf/MALTA64EL ============================================================================== --- head/sys/mips/conf/MALTA64EL Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/MALTA64EL Tue Oct 15 17:11:42 2019 (r353572) @@ -8,5 +8,4 @@ include "std.MALTA" machine mips mips64el -makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" makeoptions KERNLOADADDR=0xffffffff80100000 Modified: head/sys/mips/conf/OCTEON1 ============================================================================== --- head/sys/mips/conf/OCTEON1 Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/OCTEON1 Tue Oct 15 17:11:42 2019 (r353572) @@ -20,7 +20,7 @@ ident OCTEON1 -makeoptions ARCH_FLAGS="-march=octeon -mabi=64" +makeoptions ARCH_FLAGS="-march=octeon" makeoptions LDSCRIPT_NAME=ldscript.mips.octeon1 # Don't build any modules yet. Modified: head/sys/mips/conf/X1000 ============================================================================== --- head/sys/mips/conf/X1000 Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/X1000 Tue Oct 15 17:11:42 2019 (r353572) @@ -10,7 +10,7 @@ cpu CPU_XBURST cpu CPU_MIPS4KC makeoptions KERNLOADADDR=0x80020000 -makeoptions ARCH_FLAGS="-EL -march=mips32r2" +makeoptions ARCH_FLAGS="-march=mips32r2" # Don't build any modules yet. makeoptions MODULES_OVERRIDE="" Modified: head/sys/mips/conf/XLP64 ============================================================================== --- head/sys/mips/conf/XLP64 Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/XLP64 Tue Oct 15 17:11:42 2019 (r353572) @@ -20,7 +20,7 @@ machine mips mips64 ident XLP64 -makeoptions ARCH_FLAGS="-march=mips64r2 -mabi=64" +makeoptions ARCH_FLAGS="-march=mips64r2" makeoptions KERNLOADADDR=0xffffffff80100000 include "std.XLP" Modified: head/sys/mips/conf/XLPN32 ============================================================================== --- head/sys/mips/conf/XLPN32 Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/XLPN32 Tue Oct 15 17:11:42 2019 (r353572) @@ -20,7 +20,6 @@ machine mips mipsn32 ident XLPN32 -makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32" makeoptions KERNLOADADDR=0x80100000 include "std.XLP" Modified: head/sys/mips/conf/std.BERI ============================================================================== --- head/sys/mips/conf/std.BERI Tue Oct 15 16:27:04 2019 (r353571) +++ head/sys/mips/conf/std.BERI Tue Oct 15 17:11:42 2019 (r353572) @@ -13,8 +13,6 @@ cpu CPU_BERI options HZ=200 -makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" - makeoptions KERNLOADADDR=0xffffffff80100000 include "../beri/std.beri"