Module Name:    src
Committed By:   christos
Date:           Sun Apr 25 23:52:59 UTC 2021

Modified Files:
        src/usr.bin/ldd: Makefile.inc
        src/usr.bin/ldd/build: Makefile
        src/usr.bin/ldd/elf64: Makefile

Log Message:
Handle mipsn64


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/ldd/Makefile.inc
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/ldd/build/Makefile
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/ldd/elf64/Makefile

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

Modified files:

Index: src/usr.bin/ldd/Makefile.inc
diff -u src/usr.bin/ldd/Makefile.inc:1.7 src/usr.bin/ldd/Makefile.inc:1.8
--- src/usr.bin/ldd/Makefile.inc:1.7	Sat Jan 23 16:22:49 2016
+++ src/usr.bin/ldd/Makefile.inc	Sun Apr 25 19:52:59 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.7 2016/01/23 21:22:49 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.8 2021/04/25 23:52:59 christos Exp $
 
 WARNS?=	3	# XXX: -Wsign-compare issues ld.elf_so source
 
@@ -16,12 +16,19 @@ MLIBDIR=	i386
 MLIBDIR=	powerpc
 .endif
 
+.if !empty(MACHINE_ARCH:Mmips64*)
 # For now make "elf32" look for native (n32)
-.if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el")
 MLIBDIR=	64
 COMPAT_MLIBDIR=	o32
 CPPFLAGS+= -DLDD_ELF64 -DMIPS_N32
 .endif
+
+.if !empty(MACHINE_ARCH:Mmipsn64*)
+MLIBDIR=	n32
+COMPAT_MLIBDIR=	o32
+CPPFLAGS+= -DMIPS_N32
+.endif
+
 CPPFLAGS+=	-D_KERNTYPES
 
 .endif	# MKCOMPAT

Index: src/usr.bin/ldd/build/Makefile
diff -u src/usr.bin/ldd/build/Makefile:1.6 src/usr.bin/ldd/build/Makefile:1.7
--- src/usr.bin/ldd/build/Makefile:1.6	Sun Feb  3 19:05:20 2019
+++ src/usr.bin/ldd/build/Makefile	Sun Apr 25 19:52:59 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2019/02/04 00:05:20 mrg Exp $
+#	$NetBSD: Makefile,v 1.7 2021/04/25 23:52:59 christos Exp $
 
 NOSANITIZER=		# defined
 
@@ -18,7 +18,7 @@ CPPFLAGS.ldd.c+= -DELF64_ONLY
 .endif
 
 .if ${MKCOMPAT} != "no"
-. if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+. if ${MACHINE_MIPS64}
 LIB_ELF32COMPATDIR!=	cd ${.CURDIR}/../elf32_compat && ${PRINTOBJDIR}
 EXTRA_LIBS+=		${LIB_ELF32COMPATDIR}/libldd_elf32_compat.a
 . endif

Index: src/usr.bin/ldd/elf64/Makefile
diff -u src/usr.bin/ldd/elf64/Makefile:1.12 src/usr.bin/ldd/elf64/Makefile:1.13
--- src/usr.bin/ldd/elf64/Makefile:1.12	Sun Feb  3 19:05:20 2019
+++ src/usr.bin/ldd/elf64/Makefile	Sun Apr 25 19:52:59 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2019/02/04 00:05:20 mrg Exp $
+#	$NetBSD: Makefile,v 1.13 2021/04/25 23:52:59 christos Exp $
 
 NOSANITIZER=		# defined
 
@@ -41,7 +41,7 @@ CPPFLAGS+=	-D${_d}=_elf64_${_d}
 .endfor
 
 .if ${MKCOMPAT} != "no"
-. if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+. if ${MACHINE_MIPS64}
 CPPFLAGS+=	-DRTLD_ARCH_SUBDIR=\"${MLIBDIR}\"
 . endif
 .endif

Reply via email to