Source-Changes-HG archive

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

[src/trunk]: src/compat mips64 -> o32 64



details:   https://anonhg.NetBSD.org/src/rev/dd73b028ae7a
branches:  trunk
changeset: 1020841:dd73b028ae7a
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 25 15:18:23 2021 +0000

description:
mips64  -> o32 64
mipsn64 -> o32 n32

diffstat:

 compat/archdirs.mk           |   9 +++++++--
 compat/mips64/64/bsd.64.mk   |   4 ++--
 compat/mips64/n32/Makefile   |   5 +++++
 compat/mips64/n32/bsd.n32.mk |  23 +++++++++++++++++++++++
 compat/mips64/o32/bsd.o32.mk |  12 ++++++------
 5 files changed, 43 insertions(+), 10 deletions(-)

diffs (102 lines):

diff -r 998c8744dd57 -r dd73b028ae7a compat/archdirs.mk
--- a/compat/archdirs.mk        Sun Apr 25 15:16:56 2021 +0000
+++ b/compat/archdirs.mk        Sun Apr 25 15:18:23 2021 +0000
@@ -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+= 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
diff -r 998c8744dd57 -r dd73b028ae7a compat/mips64/64/bsd.64.mk
--- a/compat/mips64/64/bsd.64.mk        Sun Apr 25 15:16:56 2021 +0000
+++ b/compat/mips64/64/bsd.64.mk        Sun Apr 25 15:18:23 2021 +0000
@@ -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
diff -r 998c8744dd57 -r dd73b028ae7a compat/mips64/n32/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/compat/mips64/n32/Makefile        Sun Apr 25 15:18:23 2021 +0000
@@ -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"
diff -r 998c8744dd57 -r dd73b028ae7a compat/mips64/n32/bsd.n32.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/compat/mips64/n32/bsd.n32.mk      Sun Apr 25 15:18:23 2021 +0000
@@ -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"
diff -r 998c8744dd57 -r dd73b028ae7a compat/mips64/o32/bsd.o32.mk
--- a/compat/mips64/o32/bsd.o32.mk      Sun Apr 25 15:16:56 2021 +0000
+++ b/compat/mips64/o32/bsd.o32.mk      Sun Apr 25 15:18:23 2021 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index