mips64 -> o32 64

mipsn64 -> o32 n32
This commit is contained in:
christos 2021-04-25 15:18:23 +00:00
parent e21885fc4c
commit 3c0adb8bc4
5 changed files with 43 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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