Module Name:    src
Committed By:   christos
Date:           Sun Apr 25 15:18:23 UTC 2021

Modified Files:
        src/compat: archdirs.mk
        src/compat/mips64/64: bsd.64.mk
        src/compat/mips64/o32: bsd.o32.mk
Added Files:
        src/compat/mips64/n32: Makefile bsd.n32.mk

Log Message:
mips64  -> o32 64
mipsn64 -> o32 n32


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/compat/archdirs.mk
cvs rdiff -u -r1.12 -r1.13 src/compat/mips64/64/bsd.64.mk
cvs rdiff -u -r0 -r1.1 src/compat/mips64/n32/Makefile \
    src/compat/mips64/n32/bsd.n32.mk
cvs rdiff -u -r1.14 -r1.15 src/compat/mips64/o32/bsd.o32.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/compat/archdirs.mk
diff -u src/compat/archdirs.mk:1.12 src/compat/archdirs.mk:1.13
--- src/compat/archdirs.mk:1.12	Thu Jun 13 17:17:54 2019
+++ src/compat/archdirs.mk	Sun Apr 25 11:18:23 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: archdirs.mk,v 1.12 2019/06/13 21:17:54 christos Exp $
+#	$NetBSD: archdirs.mk,v 1.13 2021/04/25 15:18:23 christos Exp $
 
 # list of subdirs used per-platform
 
@@ -14,11 +14,16 @@ ARCHDIR_SUBDIR+= amd64/i386
 ARCHDIR_SUBDIR+= arm/oabi
 .endif
 
-.if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el")
+.if !empty(MACHINE_ARCH:Mmips64*)
 ARCHDIR_SUBDIR+= mips64/64
 ARCHDIR_SUBDIR+= mips64/o32
 .endif
 
+.if !empty(MACHINE_ARCH:Mmipsn64*)
+ARCHDIR_SUBDIR+= mips64/n32
+ARCHDIR_SUBDIR+= mips64/o32
+.endif
+
 .if ${MACHINE_ARCH} == "powerpc64"
 ARCHDIR_SUBDIR+= powerpc64/powerpc
 .endif

Index: src/compat/mips64/64/bsd.64.mk
diff -u src/compat/mips64/64/bsd.64.mk:1.12 src/compat/mips64/64/bsd.64.mk:1.13
--- src/compat/mips64/64/bsd.64.mk:1.12	Tue Feb  6 05:00:00 2018
+++ src/compat/mips64/64/bsd.64.mk	Sun Apr 25 11:18:23 2021
@@ -1,6 +1,6 @@
-#	$NetBSD: bsd.64.mk,v 1.12 2018/02/06 10:00:00 mrg Exp $
+#	$NetBSD: bsd.64.mk,v 1.13 2021/04/25 15:18:23 christos Exp $
 
-.if ${MACHINE_ARCH} == "mips64eb"
+.if !empty(MACHINE_ARCH:M*eb)
 LD+=		-m elf64btsmip
 .else
 LD+=		-m elf64ltsmip

Index: src/compat/mips64/o32/bsd.o32.mk
diff -u src/compat/mips64/o32/bsd.o32.mk:1.14 src/compat/mips64/o32/bsd.o32.mk:1.15
--- src/compat/mips64/o32/bsd.o32.mk:1.14	Fri Oct  7 15:10:37 2016
+++ src/compat/mips64/o32/bsd.o32.mk	Sun Apr 25 11:18:23 2021
@@ -1,6 +1,6 @@
-#	$NetBSD: bsd.o32.mk,v 1.14 2016/10/07 19:10:37 christos Exp $
+#	$NetBSD: bsd.o32.mk,v 1.15 2021/04/25 15:18:23 christos Exp $
 
-.if ${MACHINE_ARCH} == "mips64eb"
+.if !empty(MACHINE_ARCH:M*eb)
 LD+=		-m elf32btsmip
 .else
 LD+=		-m elf32ltsmip
@@ -8,10 +8,10 @@ LD+=		-m elf32ltsmip
 .ifndef MLIBDIR
 MLIBDIR=	o32
 
-LIBC_MACHINE_ARCH=	${MACHINE_ARCH:S/64//}
-LIBGCC_MACHINE_ARCH=	${MACHINE_ARCH:S/64//}
-GOMP_MACHINE_ARCH=	${MACHINE_ARCH:S/64//}
-XORG_MACHINE_ARCH=	${MACHINE_ARCH:S/64//}
+LIBC_MACHINE_ARCH=	${MACHINE_ARCH:S/mipsn/mips/:S/64//}
+LIBGCC_MACHINE_ARCH=	${LIBC_MACHINE_ARCH}
+GOMP_MACHINE_ARCH=	${LIBC_MACHINE_ARCH}
+XORG_MACHINE_ARCH=	${LIBC_MACHINE_ARCH}
 
 COPTS+=		-mabi=32 -march=mips3
 CPUFLAGS+=	-mabi=32 -march=mips3

Added files:

Index: src/compat/mips64/n32/Makefile
diff -u /dev/null src/compat/mips64/n32/Makefile:1.1
--- /dev/null	Sun Apr 25 11:18:23 2021
+++ src/compat/mips64/n32/Makefile	Sun Apr 25 11:18:23 2021
@@ -0,0 +1,5 @@
+#	$NetBSD: Makefile,v 1.1 2021/04/25 15:18:23 christos Exp $
+
+BSD_MK_COMPAT_FILE=${.CURDIR}/bsd.n32.mk
+
+.include "../../compatsubdir.mk"
Index: src/compat/mips64/n32/bsd.n32.mk
diff -u /dev/null src/compat/mips64/n32/bsd.n32.mk:1.1
--- /dev/null	Sun Apr 25 11:18:23 2021
+++ src/compat/mips64/n32/bsd.n32.mk	Sun Apr 25 11:18:23 2021
@@ -0,0 +1,23 @@
+#	$NetBSD: bsd.n32.mk,v 1.1 2021/04/25 15:18:23 christos Exp $
+
+.if !empty(MACHINE_ARCH:M*eb)
+LD+=		-m elf32btsmipn32
+.else
+LD+=		-m elf32ltsmipn32
+.endif
+.ifndef MLIBDIR
+MLIBDIR=	n32
+
+LIBC_MACHINE_ARCH=	${MACHINE_ARCH:S/mipsn/mips/:S/64//}
+LIBGCC_MACHINE_ARCH=	${LIBC_MACHINE_ARCH}
+GOMP_MACHINE_ARCH=	${LIBC_MACHINE_ARCH}
+XORG_MACHINE_ARCH=	${LIBC_MACHINE_ARCH}
+
+COPTS+=		-mabi=n32
+CPUFLAGS+=	-mabi=n32
+LDADD+=		-mabi=n32
+LDFLAGS+=	-mabi=n32
+MKDEPFLAGS+=	-mabi=n32
+.endif
+
+.include "${.PARSEDIR}/../../Makefile.compat"

Reply via email to