From d51592e4eb2bc951f0c33a6e69be22aa8ea84d6f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 16 Mar 2022 10:37:41 -0700 Subject: libucontext: Upgrade to 1.2 release License-Update: Copyright years changed [1] aarch64 implements simd register save/restore loongarch64 supported added [1] https://github.com/kaniini/libucontext/commit/9943d4f5fc31a23a591e74caf24ce4effd887501 Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- .../0001-meson-Add-option-to-pass-cpu.patch | 49 -------------------- meta/recipes-core/musl/libucontext_1.2.bb | 52 +++++++++++++++++++++ meta/recipes-core/musl/libucontext_git.bb | 54 ---------------------- 3 files changed, 52 insertions(+), 103 deletions(-) delete mode 100644 meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch create mode 100644 meta/recipes-core/musl/libucontext_1.2.bb delete mode 100644 meta/recipes-core/musl/libucontext_git.bb (limited to 'meta') diff --git a/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch b/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch deleted file mode 100644 index 1fdc9f739d..0000000000 --- a/meta/recipes-core/musl/libucontext/0001-meson-Add-option-to-pass-cpu.patch +++ /dev/null @@ -1,49 +0,0 @@ -From a530eed9e7e6872e10fe92efaf1e9739471c30ca Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - 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/meta/recipes-core/musl/libucontext_1.2.bb b/meta/recipes-core/musl/libucontext_1.2.bb new file mode 100644 index 0000000000..4e34df1439 --- /dev/null +++ b/meta/recipes-core/musl/libucontext_1.2.bb @@ -0,0 +1,52 @@ +# Copyright (C) 2019 Khem Raj +# Released under the MIT license (see COPYING.MIT for the terms) + +SUMMARY = "ucontext implementation featuring glibc-compatible ABI" +HOMEPAGE = "https://github.com/kaniini/libucontext" +LICENSE = "ISC" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ebea527af0602d509b7f4c49533fb1bd" +SECTION = "libs" +DEPENDS = "" + +SRCREV = "4dde3417b4bb4b1b1545bd913be337680b5e28c3" +SRC_URI = "git://github.com/kaniini/libucontext;branch=master;protocol=https \ + " + +S = "${WORKDIR}/git" + +COMPATIBLE_HOST = ".*-musl.*" + +valid_archs = " \ + x86 x86_64 \ + ppc ppc64 \ + mips mips64 \ + arm aarch64 \ + s390x \ +" + +def map_kernel_arch(a, d): + import re + + valid_archs = d.getVar('valid_archs').split() + + if a in valid_archs: return a + elif re.match('(i.86|athlon)$', a): return 'x86' + elif re.match('x86.64$', a): return 'x86_64' + elif re.match('armeb$', a): return 'arm' + elif re.match('aarch64$', a): return 'aarch64' + elif re.match('aarch64_be$', a): return 'aarch64' + elif re.match('aarch64_ilp32$', a): return 'aarch64' + elif re.match('aarch64_be_ilp32$', a): return 'aarch64' + elif re.match('mips(isa|)(32|)(r6|)(el|)$', a): return 'mips' + elif re.match('mips(isa|)64(r6|)(el|)$', a): return 'mips64' + elif re.match('p(pc64|owerpc64)(le)', a): return 'ppc64' + elif re.match('p(pc|owerpc)', a): return 'ppc' + elif re.match('riscv64$', a): return 'riscv64' + elif re.match('riscv32$', a): return 'riscv32' + else: + if not d.getVar("TARGET_OS").startswith("linux"): + return a + bb.error("cannot map '%s' to a linux kernel architecture" % a) + +EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" +inherit meson diff --git a/meta/recipes-core/musl/libucontext_git.bb b/meta/recipes-core/musl/libucontext_git.bb deleted file mode 100644 index 9061cf0b1b..0000000000 --- a/meta/recipes-core/musl/libucontext_git.bb +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright (C) 2019 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -SUMMARY = "ucontext implementation featuring glibc-compatible ABI" -HOMEPAGE = "https://github.com/kaniini/libucontext" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6eed01fa0e673c76f5a5715438f65b1d" -SECTION = "libs" -DEPENDS = "" - -PV = "1.1+${SRCPV}" -SRCREV = "335ee864ef6f4a5d4b525453fd9dbfb3507cfecc" -SRC_URI = "git://github.com/kaniini/libucontext;branch=master;protocol=https \ - file://0001-meson-Add-option-to-pass-cpu.patch \ - " - -S = "${WORKDIR}/git" - -COMPATIBLE_HOST = ".*-musl.*" - -valid_archs = " \ - x86 x86_64 \ - ppc ppc64 \ - mips mips64 \ - arm aarch64 \ - s390x \ -" - -def map_kernel_arch(a, d): - import re - - valid_archs = d.getVar('valid_archs').split() - - if a in valid_archs: return a - elif re.match('(i.86|athlon)$', a): return 'x86' - elif re.match('x86.64$', a): return 'x86_64' - elif re.match('armeb$', a): return 'arm' - elif re.match('aarch64$', a): return 'aarch64' - elif re.match('aarch64_be$', a): return 'aarch64' - elif re.match('aarch64_ilp32$', a): return 'aarch64' - elif re.match('aarch64_be_ilp32$', a): return 'aarch64' - elif re.match('mips(isa|)(32|)(r6|)(el|)$', a): return 'mips' - elif re.match('mips(isa|)64(r6|)(el|)$', a): return 'mips64' - elif re.match('p(pc64|owerpc64)(le)', a): return 'ppc64' - elif re.match('p(pc|owerpc)', a): return 'ppc' - elif re.match('riscv64$', a): return 'riscv64' - elif re.match('riscv32$', a): return 'riscv32' - else: - if not d.getVar("TARGET_OS").startswith("linux"): - return a - bb.error("cannot map '%s' to a linux kernel architecture" % a) - -EXTRA_OEMESON = "-Dcpu=${@map_kernel_arch(d.getVar('TARGET_ARCH'), d)}" -inherit meson -- cgit 1.2.3-korg