diff options
-rw-r--r-- | meta-oe/recipes-support/zchunk/files/clang.patch | 35 | ||||
-rw-r--r-- | meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb | 22 | ||||
-rw-r--r-- | meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb | 25 |
3 files changed, 60 insertions, 22 deletions
diff --git a/meta-oe/recipes-support/zchunk/files/clang.patch b/meta-oe/recipes-support/zchunk/files/clang.patch new file mode 100644 index 0000000000..86faf4aac7 --- /dev/null +++ b/meta-oe/recipes-support/zchunk/files/clang.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From e69d907c3fe8765ce50ce1258648ebc8283ef8a7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 22 Feb 2023 14:55:07 -0800 | ||
4 | Subject: [PATCH] meson: Use global function in argp check | ||
5 | |||
6 | clang is optimizing away parse_opt() since its marked static and not | ||
7 | used in main(), make life a bit harder for clang :) | ||
8 | removing static now emits the global symbols to be resolved during link | ||
9 | and when libargp is missing the error is thrown rightly | ||
10 | |||
11 | riscv64-yoe-linux-musl-ld: /tmp/a-5ba039.o: in function `.Lpcrel_hi0': | ||
12 | a.c:(.text+0x44): undefined reference to `argp_state_help' | ||
13 | clang-16: error: linker command failed with exit code 1 (use -v to see invocation) | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | |||
17 | Upstream-Status: Submitted [https://github.com/zchunk/zchunk/pull/92/] | ||
18 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
19 | --- | ||
20 | meson.build | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/meson.build b/meson.build | ||
24 | index 3b92d58..ab54abd 100644 | ||
25 | --- a/meson.build | ||
26 | +++ b/meson.build | ||
27 | @@ -57,7 +57,7 @@ if host_machine.system() == 'windows' | ||
28 | endif | ||
29 | |||
30 | # argp-standalone dependency (if required) | ||
31 | -if build_machine.system() == 'windows' or build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}') | ||
32 | +if build_machine.system() == 'windows' or build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nerror_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}') | ||
33 | argplib = cc.find_library('argp', has_headers : ['argp.h'], required: false) | ||
34 | if not argplib.found() | ||
35 | argplib = dependency('argp-standalone') | ||
diff --git a/meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb b/meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb deleted file mode 100644 index 0baea5032a..0000000000 --- a/meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | DESCRIPTION = "A file format designed for highly efficient deltas while maintaining good compression" | ||
2 | AUTHOR = "Jonathan Dieter" | ||
3 | |||
4 | LICENSE = "BSD-2-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=daf6e68539f564601a5a5869c31e5242" | ||
6 | |||
7 | SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=main" | ||
8 | |||
9 | SRCREV = "dd6a30a1e4e8b738b0cafc682f3c00e7706134e5" | ||
10 | S = "${WORKDIR}/git" | ||
11 | |||
12 | DEPENDS = "\ | ||
13 | curl \ | ||
14 | zstd \ | ||
15 | " | ||
16 | |||
17 | DEPENDS:append:libc-musl = " argp-standalone" | ||
18 | LDFLAGS:append:libc-musl = " -largp" | ||
19 | |||
20 | inherit meson pkgconfig | ||
21 | |||
22 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb b/meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb new file mode 100644 index 0000000000..b4fd027603 --- /dev/null +++ b/meta-oe/recipes-support/zchunk/zchunk_1.2.4.bb | |||
@@ -0,0 +1,25 @@ | |||
1 | DESCRIPTION = "A file format designed for highly efficient deltas while maintaining good compression" | ||
2 | AUTHOR = "Jonathan Dieter" | ||
3 | |||
4 | LICENSE = "BSD-2-Clause" | ||
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=daf6e68539f564601a5a5869c31e5242" | ||
6 | |||
7 | SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=main \ | ||
8 | file://clang.patch" | ||
9 | |||
10 | SRCREV = "0bed8496262a71beadccd4e562bdac093ef6e06f" | ||
11 | S = "${WORKDIR}/git" | ||
12 | |||
13 | DEPENDS = "zstd" | ||
14 | DEPENDS:append:libc-musl = " argp-standalone" | ||
15 | |||
16 | inherit meson pkgconfig lib_package | ||
17 | |||
18 | PACKAGECONFIG ??= "openssl zckdl" | ||
19 | |||
20 | # zckdl gets packaged into zchunk-bin | ||
21 | PACKAGECONFIG[zckdl] = "-Dwith-curl=enabled,-Dwith-curl=disabled,curl" | ||
22 | # Use OpenSSL primitives for SHA | ||
23 | PACKAGECONFIG[openssl] = "-Dwith-openssl=enabled,-Dwith-openssl=disabled,openssl" | ||
24 | |||
25 | BBCLASSEXTEND = "native nativesdk" | ||