diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-03-02 09:52:54 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-04 11:34:58 +0000 |
commit | 02d66e49c27e9cc32a1e2fff11ccb1653af223b7 (patch) | |
tree | 5b845ed3b1754ede6e1a5bd93e3e82f5169962d2 /meta/recipes-core/musl/musl | |
parent | 220d7451f65cb2e32a06503e36075889c63b0bd9 (diff) | |
download | openembedded-core-contrib-02d66e49c27e9cc32a1e2fff11ccb1653af223b7.tar.gz |
musl: Rename files/ directory to musl/
Since it holds musl specific patches, name it so
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/musl/musl')
-rw-r--r-- | meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch new file mode 100644 index 0000000000..462d338b96 --- /dev/null +++ b/meta/recipes-core/musl/musl/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch @@ -0,0 +1,76 @@ +From 0ec74744a4cba7c5fdfaa2685995119a4fca0260 Mon Sep 17 00:00:00 2001 +From: Amarnath Valluri <amarnath.valluri@intel.com> +Date: Wed, 18 Jan 2017 16:14:37 +0200 +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. + +V2: + Make use of 'ln -r' to create relative symlinks, as most fo the distros + shipping coreutils 8.16+ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> +--- +Upstream-Status: Pending +--- + Makefile | 2 +- + tools/install.sh | 8 +++++--- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 8246b78..d1dbe39 100644 +--- a/Makefile ++++ b/Makefile +@@ -215,7 +215,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/% + $(INSTALL) -D -m 644 $< $@ + + $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so +- $(INSTALL) -D -l $(libdir)/libc.so $@ || true ++ $(INSTALL) -D -r $(DESTDIR)$(libdir)/libc.so $@ || true + + install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) + +diff --git a/tools/install.sh b/tools/install.sh +index d913b60..b6a7f79 100755 +--- a/tools/install.sh ++++ b/tools/install.sh +@@ -6,18 +6,20 @@ + # + + usage() { +-printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2 ++printf "usage: %s [-D] [-l] [-r] [-m mode] src dest\n" "$0" 1>&2 + exit 1 + } + + mkdirp= + symlink= ++symlinkflags="-s" + mode=755 + +-while getopts Dlm: name ; do ++while getopts Dlrm: name ; do + case "$name" in + D) mkdirp=yes ;; + l) symlink=yes ;; ++r) symlink=yes; symlinkflags="$symlinkflags -r" ;; + m) mode=$OPTARG ;; + ?) usage ;; + esac +@@ -48,7 +50,7 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP + umask 077 + + if test "$symlink" ; then +-ln -s "$1" "$tmp" ++ln $symlinkflags "$1" "$tmp" + else + cat < "$1" > "$tmp" + chmod "$mode" "$tmp" +-- +2.7.4 + |