Module Name: src Committed By: matt Date: Mon Jun 22 06:46:27 UTC 2015
Modified Files: src/sys/modules/arch: archdirs.mk Added Files: src/sys/modules/arch/mips/mips-n32: Makefile bsd.mips-n32.mk Log Message: Add support for build mips64 kernel modules as N32 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/modules/arch/archdirs.mk cvs rdiff -u -r0 -r1.1 src/sys/modules/arch/mips/mips-n32/Makefile \ src/sys/modules/arch/mips/mips-n32/bsd.mips-n32.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/modules/arch/archdirs.mk diff -u src/sys/modules/arch/archdirs.mk:1.2 src/sys/modules/arch/archdirs.mk:1.3 --- src/sys/modules/arch/archdirs.mk:1.2 Mon Aug 11 03:43:25 2014 +++ src/sys/modules/arch/archdirs.mk Mon Jun 22 06:46:27 2015 @@ -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 @@ ARCHDIR_SUBDIR= x86/i386-xen x86/i386pae .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 Added files: Index: src/sys/modules/arch/mips/mips-n32/Makefile diff -u /dev/null src/sys/modules/arch/mips/mips-n32/Makefile:1.1 --- /dev/null Mon Jun 22 06:46:27 2015 +++ src/sys/modules/arch/mips/mips-n32/Makefile Mon Jun 22 06:46:27 2015 @@ -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" Index: src/sys/modules/arch/mips/mips-n32/bsd.mips-n32.mk diff -u /dev/null src/sys/modules/arch/mips/mips-n32/bsd.mips-n32.mk:1.1 --- /dev/null Mon Jun 22 06:46:27 2015 +++ src/sys/modules/arch/mips/mips-n32/bsd.mips-n32.mk Mon Jun 22 06:46:27 2015 @@ -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_