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" _______________________________________________ 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"