summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-core/musl
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-core/musl')
-rw-r--r--poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch49
-rw-r--r--poky/meta/recipes-core/musl/libucontext_git.bb22
-rw-r--r--poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch32
-rw-r--r--poky/meta/recipes-core/musl/musl_git.bb1
4 files changed, 88 insertions, 16 deletions
diff --git a/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch b/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch
new file mode 100644
index 0000000000..1fdc9f739d
--- /dev/null
+++ b/poky/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch
@@ -0,0 +1,49 @@
+From a530eed9e7e6872e10fe92efaf1e9739471c30ca Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 30 May 2021 08:30:28 -0700
+Subject: [PATCH] meson: Add option to pass cpu
+
+This helps with cross compile setups, where host_cpu != target_cpu
+therefore detecting it on the fly will end up with wrong cpu to build
+for
+
+Upstream-Status: Submitted [https://github.com/kaniini/libucontext/pull/28]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ meson.build | 6 +++++-
+ meson_options.txt | 4 +++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index e863780..2b4bdbd 100644
+--- a/meson.build
++++ b/meson.build
+@@ -6,7 +6,11 @@ project(
+ version : run_command('head', files('VERSION')).stdout()
+ )
+
+-cpu = host_machine.cpu_family()
++cpu = get_option('cpu')
++if cpu == ''
++ cpu = host_machine.cpu_family()
++endif
++
+ if cpu == 'sh4'
+ cpu = 'sh'
+ endif
+diff --git a/meson_options.txt b/meson_options.txt
+index d4201d1..864d83c 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,4 +1,6 @@
+ option('freestanding', type : 'boolean', value : false,
+ description: 'Do not use system headers')
+ option('export_unprefixed', type : 'boolean', value : true,
+- description: 'Export POSIX 2004 ucontext names as alises')
+\ No newline at end of file
++ description: 'Export POSIX 2004 ucontext names as alises')
++option('cpu', type : 'string', value : '',
++ description: 'Target CPU architecture for cross compile')
+--
+2.31.1
+
diff --git a/poky/meta/recipes-core/musl/libucontext_git.bb b/poky/meta/recipes-core/musl/libucontext_git.bb
index 11affebb49..d8ae8242c5 100644
--- a/poky/meta/recipes-core/musl/libucontext_git.bb
+++ b/poky/meta/recipes-core/musl/libucontext_git.bb
@@ -8,10 +8,11 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=6eed01fa0e673c76f5a5715438f65b1d"
SECTION = "libs"
DEPENDS = ""
-PV = "0.10+${SRCPV}"
-SRCREV = "19fa1bbfc26efb92147b5e85cc0ca02a0e837561"
+PV = "1.1+${SRCPV}"
+SRCREV = "335ee864ef6f4a5d4b525453fd9dbfb3507cfecc"
SRC_URI = "git://github.com/kaniini/libucontext \
-"
+ file://0001-meson-Add-option-to-pass-cpu.patch \
+ "
S = "${WORKDIR}/git"
@@ -49,16 +50,5 @@ def map_kernel_arch(a, d):
return a
bb.error("cannot map '%s' to a linux kernel architecture" % a)
-export ARCH = "${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
-
-CFLAGS += "-Iarch/${ARCH} -Iarch/common"
-
-EXTRA_OEMAKE = "CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' LIBDIR='${base_libdir}'"
-
-do_compile() {
- oe_runmake ARCH=${ARCH}
-}
-
-do_install() {
- oe_runmake ARCH="${ARCH}" DESTDIR="${D}" install
-}
+EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}"
+inherit meson
diff --git a/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch b/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch
new file mode 100644
index 0000000000..9d9f16cee6
--- /dev/null
+++ b/poky/meta/recipes-core/musl/musl/0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch
@@ -0,0 +1,32 @@
+From 40732d03990632049d5ba63dd736269a81756b16 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 19 May 2021 00:30:05 -0700
+Subject: [PATCH] riscv: Rename __NR_fstatat __NR_newfstatat
+
+on riscv64 this syscall is called __NR_newfstatat
+this helps the name match kernel UAPI for external
+programs
+
+Upstream-Status: Submitted [https://www.openwall.com/lists/musl/2021/05/19/3]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Cc: zabolcs Nagy <nsz@port70.net>
+---
+ arch/riscv64/bits/syscall.h.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/riscv64/bits/syscall.h.in b/arch/riscv64/bits/syscall.h.in
+index f9c421d0..39c0d650 100644
+--- a/arch/riscv64/bits/syscall.h.in
++++ b/arch/riscv64/bits/syscall.h.in
+@@ -76,7 +76,7 @@
+ #define __NR_splice 76
+ #define __NR_tee 77
+ #define __NR_readlinkat 78
+-#define __NR_fstatat 79
++#define __NR_newfstatat 79
+ #define __NR_fstat 80
+ #define __NR_sync 81
+ #define __NR_fsync 82
+--
+2.31.1
+
diff --git a/poky/meta/recipes-core/musl/musl_git.bb b/poky/meta/recipes-core/musl/musl_git.bb
index ef8bc2eec3..795b888bb3 100644
--- a/poky/meta/recipes-core/musl/musl_git.bb
+++ b/poky/meta/recipes-core/musl/musl_git.bb
@@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}"
SRC_URI = "git://git.musl-libc.org/musl \
file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
+ file://0001-riscv-Rename-__NR_fstatat-__NR_newfstatat.patch \
"
S = "${WORKDIR}/git"