Module Name: src
Committed By: he
Date: Thu Aug 20 19:17:19 UTC 2009
Modified Files:
src/usr.bin/ldd: Makefile ldd.c ldd_elfxx.c
Log Message:
Don't include <a.out.h> unless it's needed, and don't build
the aout subdir if on mips. Fixes build for mips ports.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/usr.bin/ldd/Makefile
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/ldd/ldd.c
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/ldd/ldd_elfxx.c
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
diff -u src/usr.bin/ldd/Makefile:1.10 src/usr.bin/ldd/Makefile:1.11
--- src/usr.bin/ldd/Makefile:1.10 Tue Apr 14 22:15:22 2009
+++ src/usr.bin/ldd/Makefile Thu Aug 20 19:17:19 2009
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2009/04/14 22:15:22 lukem Exp $
+# $NetBSD: Makefile,v 1.11 2009/08/20 19:17:19 he Exp $
WARNS?= 3 # XXX: -Wsign-compare issues ld.elf_so source
@@ -8,9 +8,14 @@
SRCS= ldd.c
MAN= ldd.1
-SUBDIR= aout elf32 elf64
+
+.if (${MACHINE_ARCH} != "mips")
+SUBDIR= aout
LIB_AOUTDIR!= cd ${.CURDIR}/aout && ${PRINTOBJDIR}
EXTRA_LIBS+= ${LIB_AOUTDIR}/libldd_aout.a
+.endif
+
+SUBDIR+= elf32 elf64
.if (${MACHINE_ARCH} != "alpha")
LIB_ELF32DIR!= cd ${.CURDIR}/elf32 && ${PRINTOBJDIR}
Index: src/usr.bin/ldd/ldd.c
diff -u src/usr.bin/ldd/ldd.c:1.6 src/usr.bin/ldd/ldd.c:1.7
--- src/usr.bin/ldd/ldd.c:1.6 Wed May 20 16:20:01 2009
+++ src/usr.bin/ldd/ldd.c Thu Aug 20 19:17:19 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ldd.c,v 1.6 2009/05/20 16:20:01 christos Exp $ */
+/* $NetBSD: ldd.c,v 1.7 2009/08/20 19:17:19 he Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,14 +62,13 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ldd.c,v 1.6 2009/05/20 16:20:01 christos Exp $");
+__RCSID("$NetBSD: ldd.c,v 1.7 2009/08/20 19:17:19 he Exp $");
#endif /* not lint */
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/wait.h>
-#include <a.out.h>
#include <dirent.h>
#include <err.h>
#include <errno.h>
Index: src/usr.bin/ldd/ldd_elfxx.c
diff -u src/usr.bin/ldd/ldd_elfxx.c:1.2 src/usr.bin/ldd/ldd_elfxx.c:1.3
--- src/usr.bin/ldd/ldd_elfxx.c:1.2 Tue Feb 3 03:01:02 2009
+++ src/usr.bin/ldd/ldd_elfxx.c Thu Aug 20 19:17:19 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ldd_elfxx.c,v 1.2 2009/02/03 03:01:02 mrg Exp $ */
+/* $NetBSD: ldd_elfxx.c,v 1.3 2009/08/20 19:17:19 he Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -62,14 +62,13 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ldd_elfxx.c,v 1.2 2009/02/03 03:01:02 mrg Exp $");
+__RCSID("$NetBSD: ldd_elfxx.c,v 1.3 2009/08/20 19:17:19 he Exp $");
#endif /* not lint */
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/wait.h>
-#include <a.out.h>
#include <dirent.h>
#include <err.h>
#include <errno.h>