summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/musl/gcompat
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/musl/gcompat')
-rw-r--r--meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch44
-rw-r--r--meta/recipes-core/musl/gcompat/0001-make-Static-PIE-does-not-work-on-musl-ppc.patch30
2 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch b/meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch
new file mode 100644
index 0000000000..3f265e273a
--- /dev/null
+++ b/meta/recipes-core/musl/gcompat/0001-Add-fcntl64-wrapper.patch
@@ -0,0 +1,44 @@
1From 37f70f54c74c4ceeb089cbee88311ba00638f211 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 13 Oct 2023 21:02:23 -0700
4Subject: [PATCH] Add fcntl64 wrapper
5
6fixes loadtime errors with pvr precompiled driver for visionfive2
7
8load libpvr_dri_support.so: Error relocating /usr/lib/libpvr_dri_support.so: fcntl64: symbol not found
9
10Upstream-Status: Submitted [https://git.adelielinux.org/adelie/gcompat/-/merge_requests/28]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 libgcompat/unistd.c | 11 +++++++++++
14 1 file changed, 11 insertions(+)
15
16diff --git a/libgcompat/unistd.c b/libgcompat/unistd.c
17index 011fba2..400abf3 100644
18--- a/libgcompat/unistd.c
19+++ b/libgcompat/unistd.c
20@@ -1,6 +1,7 @@
21 #include <assert.h> /* assert */
22 #include <fcntl.h> /* O_CREAT */
23 #include <limits.h> /* NGROUPS_MAX */
24+#include <stdarg.h> /* va_list, va_start, va_end */
25 #include <stddef.h> /* NULL, size_t */
26 #include <unistd.h> /* confstr, getcwd, getgroups, ... */
27 #include <errno.h> /* ENOSYS, ENOMEM */
28@@ -250,3 +251,13 @@ int __close(int fd)
29 {
30 return close(fd);
31 }
32+
33+int fcntl64 (int fd, int cmd, ...)
34+{
35+ int ret;
36+ va_list ap;
37+ va_start(ap, cmd);
38+ ret = fcntl(fd, cmd, ap);
39+ va_end(ap);
40+ return ret;
41+}
42--
432.42.0
44
diff --git a/meta/recipes-core/musl/gcompat/0001-make-Static-PIE-does-not-work-on-musl-ppc.patch b/meta/recipes-core/musl/gcompat/0001-make-Static-PIE-does-not-work-on-musl-ppc.patch
new file mode 100644
index 0000000000..1d731163d0
--- /dev/null
+++ b/meta/recipes-core/musl/gcompat/0001-make-Static-PIE-does-not-work-on-musl-ppc.patch
@@ -0,0 +1,30 @@
1From 01180e78fe9568e7fb2673ba61801c42f0f70115 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 11 Mar 2022 10:37:51 -0800
4Subject: [PATCH] make: Static PIE does not work on musl/ppc
5
6Fixes linker error e.g.
7"read-only segment has dynamic relocations"
8
9Upstream-Status: Inappropriate [OE specific]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 Makefile | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/Makefile b/Makefile
16index cbb7634..69ee228 100644
17--- a/Makefile
18+++ b/Makefile
19@@ -76,7 +76,7 @@ ${LIBGCOMPAT_NAME}: ${LIBGCOMPAT_OBJ}
20 ${LIBGCOMPAT_OBJ}: ${LIBGCOMPAT_INCLUDE}
21
22 ${LOADER_NAME}: ${LOADER_OBJ}
23- ${CC} ${CFLAGS} ${LDFLAGS} -static-pie -o ${LOADER_NAME} ${LOADER_OBJ}
24+ ${CC} ${CFLAGS} ${LDFLAGS} -static -o ${LOADER_NAME} ${LOADER_OBJ}
25
26 .c.o:
27 ${CC} ${CPPFLAGS} ${CFLAGS} -c -D_BSD_SOURCE \
28--
292.35.1
30