Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ldd Use OBJECT_FMTS from <bsd.own.mk> to determine e...
details: https://anonhg.NetBSD.org/src/rev/9dd64fdb83a2
branches: trunk
changeset: 327221:9dd64fdb83a2
user: matt <matt%NetBSD.org@localhost>
date: Sun Mar 02 03:55:19 2014 +0000
description:
Use OBJECT_FMTS from <bsd.own.mk> to determine elf32/elf64 needs
diffstat:
usr.bin/ldd/build/Makefile | 14 +++++++-------
usr.bin/ldd/elf32/Makefile | 4 ++--
usr.bin/ldd/elf64/Makefile | 6 ++----
usr.bin/ldd/ldd.c | 6 +++---
4 files changed, 14 insertions(+), 16 deletions(-)
diffs (105 lines):
diff -r ffb5cb37b3b8 -r 9dd64fdb83a2 usr.bin/ldd/build/Makefile
--- a/usr.bin/ldd/build/Makefile Sun Mar 02 03:47:57 2014 +0000
+++ b/usr.bin/ldd/build/Makefile Sun Mar 02 03:55:19 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/04/15 08:47:02 plunky Exp $
+# $NetBSD: Makefile,v 1.2 2014/03/02 03:55:19 matt Exp $
.include <bsd.own.mk> # for MKDYNAMICROOT definition
@@ -8,9 +8,11 @@
.PATH: ${.CURDIR}/..
-.if (${MACHINE_ARCH} != "alpha")
+.if ${OBJECT_FMTS:Melf32} != ""
LIB_ELF32DIR!= cd ${.CURDIR}/../elf32 && ${PRINTOBJDIR}
EXTRA_LIBS+= ${LIB_ELF32DIR}/libldd_elf32.a
+.else
+CPPFLAGS.ldd.c+= -DELF64_ONLY
.endif
.if (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
@@ -18,14 +20,12 @@
EXTRA_LIBS+= ${LIB_ELF32COMPATDIR}/libldd_elf32_compat.a
.endif
-.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
- (${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
- (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+.if ${OBJECT_FMTS:Melf64} != ""
LIB_ELF64DIR!= cd ${.CURDIR}/../elf64 && ${PRINTOBJDIR}
EXTRA_LIBS+= ${LIB_ELF64DIR}/libldd_elf64.a
-CPPFLAGS.ldd.c= -DELFSIZE=64
+CPPFLAGS.ldd.c+= -DELFSIZE=64
.else
-CPPFLAGS.ldd.c= -DELFSIZE=32
+CPPFLAGS.ldd.c+= -DELFSIZE=32
.endif
LDADD+= ${EXTRA_LIBS}
diff -r ffb5cb37b3b8 -r 9dd64fdb83a2 usr.bin/ldd/elf32/Makefile
--- a/usr.bin/ldd/elf32/Makefile Sun Mar 02 03:47:57 2014 +0000
+++ b/usr.bin/ldd/elf32/Makefile Sun Mar 02 03:55:19 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2011/03/09 23:10:08 joerg Exp $
+# $NetBSD: Makefile,v 1.9 2014/03/02 03:55:19 matt Exp $
.include <bsd.own.mk>
.include <bsd.init.mk>
@@ -24,7 +24,7 @@
CPPFLAGS+= -DRTLD_ARCH_SUBDIR=\"${MLIBDIR}\"
.endif
-.if ${MACHINE_ARCH} != "alpha"
+.if ${OBJECT_FMTS:Melf32} != ""
.include "../Makefile.elf"
.endif
diff -r ffb5cb37b3b8 -r 9dd64fdb83a2 usr.bin/ldd/elf64/Makefile
--- a/usr.bin/ldd/elf64/Makefile Sun Mar 02 03:47:57 2014 +0000
+++ b/usr.bin/ldd/elf64/Makefile Sun Mar 02 03:55:19 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2011/03/09 23:10:08 joerg Exp $
+# $NetBSD: Makefile,v 1.7 2014/03/02 03:55:19 matt Exp $
.include <bsd.own.mk>
@@ -11,9 +11,7 @@
LIBISPRIVATE= yes
.PATH: ${.CURDIR}/..
-.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc64") || \
- (${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "powerpc64") || \
- (${MACHINE_ARCH} == "mips64el") || (${MACHINE_ARCH} == "mips64eb")
+.if ${OBJECT_FMTS:Melf64} != ""
# XXX we need to make sure that we don't accidentally get the elf32
# XXX versions of these.
diff -r ffb5cb37b3b8 -r 9dd64fdb83a2 usr.bin/ldd/ldd.c
--- a/usr.bin/ldd/ldd.c Sun Mar 02 03:47:57 2014 +0000
+++ b/usr.bin/ldd/ldd.c Sun Mar 02 03:55:19 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ldd.c,v 1.21 2013/03/20 15:18:42 macallan Exp $ */
+/* $NetBSD: ldd.c,v 1.22 2014/03/02 03:55:19 matt Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.21 2013/03/20 15:18:42 macallan Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.22 2014/03/02 03:55:19 matt Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -165,7 +165,7 @@
}
if (elf_ldd(fd, *argv, fmt1, fmt2) == -1
/* Alpha never had 32 bit support. */
-#if (defined(_LP64) && !defined(__alpha__)) || defined(MIPS_N32)
+#if (defined(_LP64) && !defined(ELF64_ONLY)) || defined(MIPS_N32)
&& elf32_ldd(fd, *argv, fmt1, fmt2) == -1
#if defined(__mips__) && 0 /* XXX this is still hosed for some reason */
&& elf32_ldd_compat(fd, *argv, fmt1, fmt2) == -1
Home |
Main Index |
Thread Index |
Old Index