summaryrefslogtreecommitdiffstats
path: root/Makefile.inc1
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2008-08-01 21:52:41 +0000
committerjhb <jhb@FreeBSD.org>2008-08-01 21:52:41 +0000
commita0f546e88ff3ba025ed0bdc1f1bfbcc5b44a1f49 (patch)
tree51f5c7a67159c213618ab3144d35ed1721594f3b /Makefile.inc1
parent471e3f43d52a6886559e56d484d07d83a871edb4 (diff)
downloadFreeBSD-src-a0f546e88ff3ba025ed0bdc1f1bfbcc5b44a1f49.zip
FreeBSD-src-a0f546e88ff3ba025ed0bdc1f1bfbcc5b44a1f49.tar.gz
Tweak the support for using ldd on 32-bit objects a bit further.
Specifically, build a 32-bit /usr/bin/ldd32 on amd64 which handles 32-bit objects. Since it is a 32-bit binary, it can fork a child process which can dlopen() a 32-bit shared library. The current 32-bit support in ldd can't do this because it does the dlopen() from a 64-bit process. In order to preserve an intuitive interface for users, the ldd binary automatically execs /usr/bin/ldd32 for 32-bit objects. The end result is that ldd on amd64 now transparently handles 32-bit shared libraries in addition to 32-bit binaries. Submitted by: ps (indirectly)
Diffstat (limited to 'Makefile.inc1')
-rw-r--r--Makefile.inc13
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 78da47d..cdb72a2 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -482,6 +482,8 @@ build32:
.for _t in obj depend all
cd ${.CURDIR}/libexec/rtld-elf; \
PROG=ld-elf32.so.1 ${LIB32WMAKE} ${_t}
+ cd ${.CURDIR}/usr.bin/ldd; \
+ PROG=ldd32 ${LIB32WMAKE} ${_t}
.endfor
distribute32 install32:
@@ -501,6 +503,7 @@ distribute32 install32:
cd ${.CURDIR}/secure/lib; ${LIB32IMAKE} ${.TARGET:S/32$//}
.endif
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32IMAKE} ${.TARGET:S/32$//}
+ cd ${.CURDIR}/usr.bin/ldd; PROG=ldd32 ${LIB32IMAKE} ${.TARGET:S/32$//}
.endif
OpenPOWER on IntegriCloud