Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/modules/arch Add support for build mips64 kernel modules...



details:   https://anonhg.NetBSD.org/src/rev/88e64ec6ec8b
branches:  trunk
changeset: 339012:88e64ec6ec8b
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jun 22 06:46:27 2015 +0000

description:
Add support for build mips64 kernel modules as N32

diffstat:

 sys/modules/arch/archdirs.mk                   |   6 +++++-
 sys/modules/arch/mips/mips-n32/Makefile        |   5 +++++
 sys/modules/arch/mips/mips-n32/bsd.mips-n32.mk |  19 +++++++++++++++++++
 3 files changed, 29 insertions(+), 1 deletions(-)

diffs (49 lines):

diff -r 525b1a9e4b44 -r 88e64ec6ec8b sys/modules/arch/archdirs.mk
--- a/sys/modules/arch/archdirs.mk      Mon Jun 22 06:24:17 2015 +0000
+++ b/sys/modules/arch/archdirs.mk      Mon Jun 22 06:46:27 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: archdirs.mk,v 1.2 2014/08/11 03:43:25 jnemeth Exp $
+#      $NetBSD: archdirs.mk,v 1.3 2015/06/22 06:46:27 matt Exp $
 
 # list of subdirs used per-platform
 
@@ -13,3 +13,7 @@
 .if ${MACHINE_ARCH} == "powerpc"
 ARCHDIR_SUBDIR=        powerpc/powerpc-4xx powerpc/powerpc-booke
 .endif
+
+.if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
+ARCHDIR_SUBDIR= mips/mips-n32
+.endif
diff -r 525b1a9e4b44 -r 88e64ec6ec8b sys/modules/arch/mips/mips-n32/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/modules/arch/mips/mips-n32/Makefile   Mon Jun 22 06:46:27 2015 +0000
@@ -0,0 +1,5 @@
+#      $NetBSD: Makefile,v 1.1 2015/06/22 06:46:27 matt Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.mips-n32.mk
+
+.include "../../compatsubdir.mk"
diff -r 525b1a9e4b44 -r 88e64ec6ec8b sys/modules/arch/mips/mips-n32/bsd.mips-n32.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/modules/arch/mips/mips-n32/bsd.mips-n32.mk    Mon Jun 22 06:46:27 2015 +0000
@@ -0,0 +1,19 @@
+#      $NetBSD: bsd.mips-n32.mk,v 1.1 2015/06/22 06:46:27 matt Exp $
+
+.ifndef _BSD_MIPS_N32_MK_
+.if ${MACHINE_ARCH} == "mips64eb"
+LD+=           -m elf32btsmipn32
+LDFLAGS+=      -Wl,-m,elf32btsmipn32
+.else
+LD+=           -m elf32ltsmipn32
+LDFLAGS+=      -Wl,-m,elf32ltsmipn32
+.endif
+
+_BSD_MIPS_N32_MK_=1
+
+KMODULEARCHDIR:=       mips-n32
+
+CPPFLAGS+=     -mabi=n32
+CPUFLAGS+=     -mabi=n32
+
+.endif # _BSD_MIPS_N32_MK_



Home | Main Index | Thread Index | Old Index