summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2014-02-17 22:39:57 (EST)
committer P. J. McDermott <pjm@nac.net>2014-02-17 22:46:54 (EST)
commit446b6c5805a77b288fb8cd1b7c2cfc58baca3183 (patch)
tree7d13701214d16f0e634aa735f8997ccd8d7ab85e
parent0ac829be8350905d715c6b8ec2b5b07410030c77 (diff)
Don't install and use lddlibc4 on i686-any-glibc.
-rwxr-xr-xbuild1
-rw-r--r--patches/03_ldd-dont-call-lddlibc4.patch24
2 files changed, 25 insertions, 0 deletions
diff --git a/build b/build
index 0784907..ff9beef 100755
--- a/build
+++ b/build
@@ -100,6 +100,7 @@ install-libc: build-libc
sed 's/dest//') dest/usr/lib/$(OPK_HOST_ARCH)/ld.so
rm -f dest/var/db/Makefile \
dest/sbin/sln \
+ dest/usr/bin/lddlibc4 \
dest/usr/bin/makedb \
dest/usr/bin/pcprofiledump \
dest/usr/bin/tzselect \
diff --git a/patches/03_ldd-dont-call-lddlibc4.patch b/patches/03_ldd-dont-call-lddlibc4.patch
new file mode 100644
index 0000000..a22aa18
--- /dev/null
+++ b/patches/03_ldd-dont-call-lddlibc4.patch
@@ -0,0 +1,24 @@
+Author: "P. J. McDermott" <pj@pehjota.net>
+Subject: ldd: Don't call lddlibc4
+
+On i?86-linux-gnu systems, ldd is modified to call lddlibc4, an a.out
+compatibility stub program derived from Linux libc.
+
+We don't need ldd to handle a.out programs, so we won't make ldd call this stub
+program. Debian achieves the same effect by installing their amd64 ldd on i386.
+
+diff -Naur src.orig/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed src/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed
+--- src.orig/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed 2006-08-16 21:18:26.000000000 -0400
++++ src/libc/sysdeps/unix/sysv/linux/ldd-rewrite.sed 2014-02-17 20:41:08.096156938 -0500
+@@ -1,11 +1,2 @@
+-/Maybe extra code for non-ELF binaries/a\
+- file=$1\
+- # Run the ldd stub.\
+- lddlibc4 "$file"\
+- # Test the result.\
+- if test $? -lt 3; then\
+- return 0;\
+- fi\
+- # In case of an error punt.
+ /LD_TRACE_LOADED_OBJECTS=1/a\
+ add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"