summaryrefslogtreecommitdiff
path: root/sys/conf/Makefile.mips
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2019-10-15 17:11:42 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2019-10-15 17:11:42 +0000
commit64f1604a7637d2c3006741f693e130d2607f11b8 (patch)
tree4dbb6fb4c156e99fec80e04de0c6a0c832945db2 /sys/conf/Makefile.mips
parent7c8b268a127f3ed0c569ee05c693ada6b8c07b37 (diff)
downloadsrc-test2-64f1604a7637d2c3006741f693e130d2607f11b8.tar.gz
src-test2-64f1604a7637d2c3006741f693e130d2607f11b8.zip
Notes
Diffstat (limited to 'sys/conf/Makefile.mips')
-rw-r--r--sys/conf/Makefile.mips10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/conf/Makefile.mips b/sys/conf/Makefile.mips
index de006c018e6d..88cb648916b6 100644
--- a/sys/conf/Makefile.mips
+++ b/sys/conf/Makefile.mips
@@ -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