summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-10 21:00:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-22 23:42:53 +0000
commitd48ea3354eff8244e1734fa571bb52c810431b3f (patch)
tree2d8381b3fbc387b14becaeb81b83fe5ca1e7c0d5
parenta40532a5277e1c0392032ff2d4992046477fadf0 (diff)
downloadopenembedded-core-contrib-d48ea3354eff8244e1734fa571bb52c810431b3f.tar.gz
openembedded-core-contrib-d48ea3354eff8244e1734fa571bb52c810431b3f.tar.bz2
openembedded-core-contrib-d48ea3354eff8244e1734fa571bb52c810431b3f.zip
musl: Create ld.so as a relative symlink
We have rootfs intercepts which fail on musl because ld.so on musl is an absolute symlink to /usr/lib/libc.so and then it fails to load when run with qemu user mode. Fixes rootfs failures like WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 255)! See log for details! WARNING: The postinstalls for the following packages will be postponed for first boot: libgdk-pixbuf-2.0-loader-jpeg li bgdk-pixbuf-2.0-loader-png libgdk-pixbuf-2.0-loader-gif libgdk-pixbuf-2.0-loader-xpm WARNING: [log_check] core-image-sato: found a warning message in the logfile (keyword 'WARNING:'): [log_check] WARNING: The postinstall intercept hook 'update_pixbuf_cache' failed (exit code: 255)! See log for details! WARNING: [log_check] core-image-sato: found a warning message in the logfile (keyword 'WARNING:'): [log_check] WARNING: The postinstalls for the following packages will be postponed for first boot: libgdk-pixbuf-2.0-lo ader-jpeg libgdk-pixbuf-2.0-loader-png libgdk-pixbuf-2.0-loader-gif libgdk-pixbuf-2.0-loader-xpm Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch34
-rw-r--r--meta/recipes-core/musl/musl_git.bb3
2 files changed, 36 insertions, 1 deletions
diff --git a/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
new file mode 100644
index 0000000000..5490b1cba6
--- /dev/null
+++ b/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
@@ -0,0 +1,34 @@
+From 94c0b97b62125d8bbc92dce0694e387d5b2ad181 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 10 Jan 2016 12:14:02 -0800
+Subject: [PATCH] Make dynamic linker a relative symlink to libc
+
+absolute symlink into $(libdir) fails to load in a cross build
+environment, especially when executing qemu in usermode to run target
+applications, which cross build systems often do, since not everything
+can be computed during cross builds, qemu in usermode often comes to aid
+in such situations to feed into cross builds.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b2226fa..0d71f7f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -189,7 +189,7 @@ $(DESTDIR)$(includedir)/%: include/%
+ $(INSTALL) -D -m 644 $< $@
+
+ $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
+- $(INSTALL) -D -l $(libdir)/libc.so $@ || true
++ $(INSTALL) -D -l ..$(libdir)/libc.so $@ || true
+
+ install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
+
+--
+2.7.0
+
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 5b94d1fe28..8970307cba 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -10,6 +10,7 @@ PV = "1.1.12+git${SRCPV}"
# mirror is at git://github.com/kraj/musl.git
SRC_URI = "git://git.musl-libc.org/musl \
+ file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
"
S = "${WORKDIR}/git"
@@ -49,7 +50,7 @@ do_install() {
oe_runmake install DESTDIR='${D}'
install -d ${D}${bindir}
- ln -s ${libdir}/libc.so ${D}${bindir}/ldd
+ ln -s ../../${libdir}/libc.so ${D}${bindir}/ldd
}
RDEPENDS_${PN}-dev = "linux-libc-headers-dev"