summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/musl/musl
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-03-02 09:52:54 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-04 11:35:42 +0000
commitce2a11c25c1482d0cecd625f8b7bd5437626a791 (patch)
treea75d1b65bb45ac1c6a1d6e81d23d62db7cd40869 /meta/recipes-core/musl/musl
parent43722946378242361680e326490568759b945e07 (diff)
downloadpoky-ce2a11c25c1482d0cecd625f8b7bd5437626a791.tar.gz
musl: Rename files/ directory to musl/
Since it holds musl specific patches, name it so (From OE-Core rev: 02d66e49c27e9cc32a1e2fff11ccb1653af223b7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.patch76
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 @@
1From 0ec74744a4cba7c5fdfaa2685995119a4fca0260 Mon Sep 17 00:00:00 2001
2From: Amarnath Valluri <amarnath.valluri@intel.com>
3Date: Wed, 18 Jan 2017 16:14:37 +0200
4Subject: [PATCH] Make dynamic linker a relative symlink to libc
5
6absolute symlink into $(libdir) fails to load in a cross build
7environment, especially when executing qemu in usermode to run target
8applications, which cross build systems often do, since not everything
9can be computed during cross builds, qemu in usermode often comes to aid
10in such situations to feed into cross builds.
11
12V2:
13 Make use of 'ln -r' to create relative symlinks, as most fo the distros
14 shipping coreutils 8.16+
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com>
18---
19Upstream-Status: Pending
20---
21 Makefile | 2 +-
22 tools/install.sh | 8 +++++---
23 2 files changed, 6 insertions(+), 4 deletions(-)
24
25diff --git a/Makefile b/Makefile
26index 8246b78..d1dbe39 100644
27--- a/Makefile
28+++ b/Makefile
29@@ -215,7 +215,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/%
30 $(INSTALL) -D -m 644 $< $@
31
32 $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
33- $(INSTALL) -D -l $(libdir)/libc.so $@ || true
34+ $(INSTALL) -D -r $(DESTDIR)$(libdir)/libc.so $@ || true
35
36 install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
37
38diff --git a/tools/install.sh b/tools/install.sh
39index d913b60..b6a7f79 100755
40--- a/tools/install.sh
41+++ b/tools/install.sh
42@@ -6,18 +6,20 @@
43 #
44
45 usage() {
46-printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2
47+printf "usage: %s [-D] [-l] [-r] [-m mode] src dest\n" "$0" 1>&2
48 exit 1
49 }
50
51 mkdirp=
52 symlink=
53+symlinkflags="-s"
54 mode=755
55
56-while getopts Dlm: name ; do
57+while getopts Dlrm: name ; do
58 case "$name" in
59 D) mkdirp=yes ;;
60 l) symlink=yes ;;
61+r) symlink=yes; symlinkflags="$symlinkflags -r" ;;
62 m) mode=$OPTARG ;;
63 ?) usage ;;
64 esac
65@@ -48,7 +50,7 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP
66 umask 077
67
68 if test "$symlink" ; then
69-ln -s "$1" "$tmp"
70+ln $symlinkflags "$1" "$tmp"
71 else
72 cat < "$1" > "$tmp"
73 chmod "$mode" "$tmp"
74--
752.7.4
76