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
This commit is contained in:
parent
7c8b268a12
commit
64f1604a76
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353572
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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=""
|
||||
|
@ -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
|
||||
|
@ -8,5 +8,4 @@ include "std.MALTA"
|
||||
|
||||
machine mips mips64el
|
||||
|
||||
makeoptions ARCH_FLAGS="-march=mips64 -mabi=64"
|
||||
makeoptions KERNLOADADDR=0xffffffff80100000
|
||||
|
@ -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.
|
||||
|
@ -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=""
|
||||
|
@ -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"
|
||||
|
@ -20,7 +20,6 @@
|
||||
machine mips mipsn32
|
||||
ident XLPN32
|
||||
|
||||
makeoptions ARCH_FLAGS="-march=mips64 -mabi=n32"
|
||||
makeoptions KERNLOADADDR=0x80100000
|
||||
|
||||
include "std.XLP"
|
||||
|
@ -13,8 +13,6 @@ cpu CPU_BERI
|
||||
|
||||
options HZ=200
|
||||
|
||||
makeoptions ARCH_FLAGS="-march=mips64 -mabi=64"
|
||||
|
||||
makeoptions KERNLOADADDR=0xffffffff80100000
|
||||
|
||||
include "../beri/std.beri"
|
||||
|
Loading…
Reference in New Issue
Block a user