diff options
Diffstat (limited to 'meta/recipes-core/musl/musl')
3 files changed, 63 insertions, 12 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 index ba00efe7b3..8b097f3276 100644 --- 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 | |||
@@ -1,7 +1,7 @@ | |||
1 | From 0ec74744a4cba7c5fdfaa2685995119a4fca0260 Mon Sep 17 00:00:00 2001 | 1 | From f95b6fd0475a95c00e886219271cb5c93838e3c3 Mon Sep 17 00:00:00 2001 |
2 | From: Amarnath Valluri <amarnath.valluri@intel.com> | 2 | From: Amarnath Valluri <amarnath.valluri@intel.com> |
3 | Date: Wed, 18 Jan 2017 16:14:37 +0200 | 3 | Date: Wed, 18 Jan 2017 16:14:37 +0200 |
4 | Subject: [PATCH] Make dynamic linker a relative symlink to libc | 4 | Subject: [PATCH 1/2] Make dynamic linker a relative symlink to libc |
5 | 5 | ||
6 | absolute symlink into $(libdir) fails to load in a cross build | 6 | absolute symlink into $(libdir) fails to load in a cross build |
7 | environment, especially when executing qemu in usermode to run target | 7 | environment, especially when executing qemu in usermode to run target |
@@ -13,18 +13,19 @@ V2: | |||
13 | Make use of 'ln -r' to create relative symlinks, as most fo the distros | 13 | Make use of 'ln -r' to create relative symlinks, as most fo the distros |
14 | shipping coreutils 8.16+ | 14 | shipping coreutils 8.16+ |
15 | 15 | ||
16 | Upstream-Status: Pending | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
17 | Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> | 18 | Signed-off-by: Amarnath Valluri <amarnath.valluri@intel.com> |
18 | --- | 19 | --- |
19 | Upstream-Status: Pending | ||
20 | --- | ||
21 | Makefile | 2 +- | 20 | Makefile | 2 +- |
22 | tools/install.sh | 8 +++++--- | 21 | tools/install.sh | 8 +++++--- |
23 | 2 files changed, 6 insertions(+), 4 deletions(-) | 22 | 2 files changed, 6 insertions(+), 4 deletions(-) |
24 | 23 | ||
24 | diff --git a/Makefile b/Makefile | ||
25 | index e8cc4436..466d9afd 100644 | ||
25 | --- a/Makefile | 26 | --- a/Makefile |
26 | +++ b/Makefile | 27 | +++ b/Makefile |
27 | @@ -210,7 +210,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc | 28 | @@ -210,7 +210,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/% |
28 | $(INSTALL) -D -m 644 $< $@ | 29 | $(INSTALL) -D -m 644 $< $@ |
29 | 30 | ||
30 | $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so | 31 | $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so |
@@ -33,6 +34,8 @@ Upstream-Status: Pending | |||
33 | 34 | ||
34 | install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) | 35 | install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),) |
35 | 36 | ||
37 | diff --git a/tools/install.sh b/tools/install.sh | ||
38 | index d913b60b..b6a7f797 100755 | ||
36 | --- a/tools/install.sh | 39 | --- a/tools/install.sh |
37 | +++ b/tools/install.sh | 40 | +++ b/tools/install.sh |
38 | @@ -6,18 +6,20 @@ | 41 | @@ -6,18 +6,20 @@ |
@@ -58,7 +61,7 @@ Upstream-Status: Pending | |||
58 | m) mode=$OPTARG ;; | 61 | m) mode=$OPTARG ;; |
59 | ?) usage ;; | 62 | ?) usage ;; |
60 | esac | 63 | esac |
61 | @@ -48,7 +50,7 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM H | 64 | @@ -48,7 +50,7 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP |
62 | umask 077 | 65 | umask 077 |
63 | 66 | ||
64 | if test "$symlink" ; then | 67 | if test "$symlink" ; then |
@@ -67,3 +70,6 @@ Upstream-Status: Pending | |||
67 | else | 70 | else |
68 | cat < "$1" > "$tmp" | 71 | cat < "$1" > "$tmp" |
69 | chmod "$mode" "$tmp" | 72 | chmod "$mode" "$tmp" |
73 | -- | ||
74 | 2.37.2 | ||
75 | |||
diff --git a/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch b/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch index 0aeb5eb5c2..59bfae5a27 100644 --- a/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch +++ b/meta/recipes-core/musl/musl/0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch | |||
@@ -1,7 +1,8 @@ | |||
1 | From 5a2886f81dbca3f2ed28eebe7d27d471da278db8 Mon Sep 17 00:00:00 2001 | 1 | From 3cce8716c6c3ae2e0c835caeac3780ec35090b2d Mon Sep 17 00:00:00 2001 |
2 | From: Serhey Popovych <serhe.popovych@gmail.com> | 2 | From: Serhey Popovych <serhe.popovych@gmail.com> |
3 | Date: Tue, 11 Dec 2018 05:44:20 -0500 | 3 | Date: Tue, 11 Dec 2018 05:44:20 -0500 |
4 | Subject: [PATCH] ldso: Use syslibdir and libdir as default pathes to libdirs | 4 | Subject: [PATCH 2/2] ldso: Use syslibdir and libdir as default pathes to |
5 | libdirs | ||
5 | 6 | ||
6 | In absence of /etc/ld-musl-$(ARCH).path ldso uses default path to search | 7 | In absence of /etc/ld-musl-$(ARCH).path ldso uses default path to search |
7 | libraries /lib:/usr/local/lib:/usr/lib. | 8 | libraries /lib:/usr/local/lib:/usr/lib. |
@@ -20,6 +21,8 @@ Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> | |||
20 | ldso/dynlink.c | 4 +++- | 21 | ldso/dynlink.c | 4 +++- |
21 | 2 files changed, 5 insertions(+), 2 deletions(-) | 22 | 2 files changed, 5 insertions(+), 2 deletions(-) |
22 | 23 | ||
24 | diff --git a/Makefile b/Makefile | ||
25 | index 466d9afd..d2f458fa 100644 | ||
23 | --- a/Makefile | 26 | --- a/Makefile |
24 | +++ b/Makefile | 27 | +++ b/Makefile |
25 | @@ -47,7 +47,8 @@ CFLAGS_AUTO = -Os -pipe | 28 | @@ -47,7 +47,8 @@ CFLAGS_AUTO = -Os -pipe |
@@ -32,6 +35,8 @@ Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> | |||
32 | CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS) | 35 | CFLAGS_ALL += $(CPPFLAGS) $(CFLAGS_AUTO) $(CFLAGS) |
33 | 36 | ||
34 | LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS) | 37 | LDFLAGS_ALL = $(LDFLAGS_AUTO) $(LDFLAGS) |
38 | diff --git a/ldso/dynlink.c b/ldso/dynlink.c | ||
39 | index cc677952..b0e8815b 100644 | ||
35 | --- a/ldso/dynlink.c | 40 | --- a/ldso/dynlink.c |
36 | +++ b/ldso/dynlink.c | 41 | +++ b/ldso/dynlink.c |
37 | @@ -29,6 +29,8 @@ | 42 | @@ -29,6 +29,8 @@ |
@@ -40,10 +45,10 @@ Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> | |||
40 | 45 | ||
41 | +#define SYS_PATH_DFLT SYSLIBDIR ":" LIBDIR | 46 | +#define SYS_PATH_DFLT SYSLIBDIR ":" LIBDIR |
42 | + | 47 | + |
43 | static void error(const char *, ...); | 48 | static void error_impl(const char *, ...); |
44 | 49 | static void error_noop(const char *, ...); | |
45 | #define MAXP2(a,b) (-(-(a)&-(b))) | 50 | static void (*error)(const char *, ...) = error_noop; |
46 | @@ -1094,7 +1096,7 @@ static struct dso *load_library(const ch | 51 | @@ -1097,7 +1099,7 @@ static struct dso *load_library(const char *name, struct dso *needed_by) |
47 | sys_path = ""; | 52 | sys_path = ""; |
48 | } | 53 | } |
49 | } | 54 | } |
@@ -52,3 +57,6 @@ Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> | |||
52 | fd = path_open(name, sys_path, buf, sizeof buf); | 57 | fd = path_open(name, sys_path, buf, sizeof buf); |
53 | } | 58 | } |
54 | pathname = buf; | 59 | pathname = buf; |
60 | -- | ||
61 | 2.37.2 | ||
62 | |||
diff --git a/meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch b/meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch new file mode 100644 index 0000000000..45d40cd5b4 --- /dev/null +++ b/meta/recipes-core/musl/musl/0003-elf.h-add-typedefs-for-Elf64_Relr-and-Elf32_Relr.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 65b0ac0d998bf0f36924a7c27ed9e702b2a5a453 Mon Sep 17 00:00:00 2001 | ||
2 | From: Violet Purcell <vimproved@inventati.org> | ||
3 | Date: Sat, 4 Nov 2023 12:09:20 -0400 | ||
4 | Subject: [PATCH] elf.h: add typedefs for Elf64_Relr and Elf32_Relr | ||
5 | |||
6 | These were overlooked when DT_RELR was added in commit | ||
7 | d32dadd60efb9d3b255351a3b532f8e4c3dd0db1, potentially breaking | ||
8 | software that treats presence of the DT_RELR macro as implying they | ||
9 | exist. | ||
10 | |||
11 | Upstream-Status: Backport [1.2.5] | ||
12 | |||
13 | Signed-off-by: Zang Ruochen <zangruochen@loongson.cn> | ||
14 | |||
15 | --- | ||
16 | include/elf.h | 5 +++++ | ||
17 | 1 file changed, 5 insertions(+) | ||
18 | |||
19 | diff --git a/include/elf.h b/include/elf.h | ||
20 | index 23f2c4bc..72d17c3a 100644 | ||
21 | --- a/include/elf.h | ||
22 | +++ b/include/elf.h | ||
23 | @@ -558,6 +558,11 @@ typedef struct { | ||
24 | |||
25 | |||
26 | |||
27 | +typedef Elf32_Word Elf32_Relr; | ||
28 | +typedef Elf64_Xword Elf64_Relr; | ||
29 | + | ||
30 | + | ||
31 | + | ||
32 | #define ELF32_R_SYM(val) ((val) >> 8) | ||
33 | #define ELF32_R_TYPE(val) ((val) & 0xff) | ||
34 | #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) | ||
35 | -- | ||
36 | 2.25.1 | ||
37 | |||