diff options
author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2017-06-06 05:21:18 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-09 17:12:14 +0100 |
commit | 9e4c044bd5e4f7520d3111e3edd21e2a1c604311 (patch) | |
tree | 8a79356264431c21897954383b57878c19b5bbaa /meta/recipes-core | |
parent | a93ec352a378af76795397aef0328322dd1cb405 (diff) | |
download | poky-9e4c044bd5e4f7520d3111e3edd21e2a1c604311.tar.gz |
busybox: fix a linking issue
A following linking error was observed:
| ==========
| archival/lib.a(tar.o): In function `tar_main':
| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
| archival/tar.c:1168: undefined reference to `unpack_Z_stream'
| ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined
| ld: final link failed: Bad value
this happened with clang compiler, with the following configs:
| CONFIG_TAR=y
| # CONFIG_FEATURE_SEAMLESS_Z is not set
which can be fixed by adding IF_FEATURE_* checks in.
(From OE-Core rev: 789254b5ae983a94346f53de18286713b80eb5f2)
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch | 70 | ||||
-rw-r--r-- | meta/recipes-core/busybox/busybox_1.24.1.bb | 1 |
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch b/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch new file mode 100644 index 0000000000..0c3c9c0f42 --- /dev/null +++ b/meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch | |||
@@ -0,0 +1,70 @@ | |||
1 | From f94412f6bb49136694c5478d0aecb19118d1b08d Mon Sep 17 00:00:00 2001 | ||
2 | From: Ming Liu <peter.x.liu@external.atlascopco.com> | ||
3 | Date: Wed, 31 May 2017 11:48:09 +0200 | ||
4 | Subject: [PATCH] tar: add IF_FEATURE_* checks | ||
5 | |||
6 | A following linking error was observed: | ||
7 | | ========== | ||
8 | | archival/lib.a(tar.o): In function `tar_main': | ||
9 | | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | ||
10 | | archival/tar.c:1168: undefined reference to `unpack_Z_stream' | ||
11 | | ld: busybox_unstripped: hidden symbol `unpack_Z_stream' isn't defined | ||
12 | | ld: final link failed: Bad value | ||
13 | |||
14 | this happened with clang compiler, with the following configs: | ||
15 | | CONFIG_TAR=y | ||
16 | | # CONFIG_FEATURE_SEAMLESS_Z is not set | ||
17 | |||
18 | which can be fixed by adding IF_FEATURE_* checks in. | ||
19 | |||
20 | Upstream-Status: Pending [ Sent to busybox upstream on 2017-06-02 ] | ||
21 | |||
22 | Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> | ||
23 | --- | ||
24 | archival/tar.c | 25 +++++++++++++++---------- | ||
25 | 1 file changed, 15 insertions(+), 10 deletions(-) | ||
26 | |||
27 | diff --git a/archival/tar.c b/archival/tar.c | ||
28 | index b70e00a..7598b71 100644 | ||
29 | --- a/archival/tar.c | ||
30 | +++ b/archival/tar.c | ||
31 | @@ -1216,21 +1216,26 @@ int tar_main(int argc UNUSED_PARAM, char **argv) | ||
32 | USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_state_t *xstate);) | ||
33 | USE_FOR_NOMMU(const char *xformer_prog;) | ||
34 | |||
35 | - if (opt & OPT_COMPRESS) | ||
36 | - USE_FOR_MMU(xformer = unpack_Z_stream;) | ||
37 | + if (opt & OPT_COMPRESS) { | ||
38 | + USE_FOR_MMU(IF_FEATURE_SEAMLESS_Z(xformer = unpack_Z_stream;)) | ||
39 | USE_FOR_NOMMU(xformer_prog = "uncompress";) | ||
40 | - if (opt & OPT_GZIP) | ||
41 | - USE_FOR_MMU(xformer = unpack_gz_stream;) | ||
42 | + } | ||
43 | + if (opt & OPT_GZIP) { | ||
44 | + USE_FOR_MMU(IF_FEATURE_SEAMLESS_GZ(xformer = unpack_gz_stream;)) | ||
45 | USE_FOR_NOMMU(xformer_prog = "gunzip";) | ||
46 | - if (opt & OPT_BZIP2) | ||
47 | - USE_FOR_MMU(xformer = unpack_bz2_stream;) | ||
48 | + } | ||
49 | + if (opt & OPT_BZIP2) { | ||
50 | + USE_FOR_MMU(IF_FEATURE_SEAMLESS_BZ2(xformer = unpack_bz2_stream;)) | ||
51 | USE_FOR_NOMMU(xformer_prog = "bunzip2";) | ||
52 | - if (opt & OPT_LZMA) | ||
53 | - USE_FOR_MMU(xformer = unpack_lzma_stream;) | ||
54 | + } | ||
55 | + if (opt & OPT_LZMA) { | ||
56 | + USE_FOR_MMU(IF_FEATURE_SEAMLESS_LZMA(xformer = unpack_lzma_stream;)) | ||
57 | USE_FOR_NOMMU(xformer_prog = "unlzma";) | ||
58 | - if (opt & OPT_XZ) | ||
59 | - USE_FOR_MMU(xformer = unpack_xz_stream;) | ||
60 | + } | ||
61 | + if (opt & OPT_XZ) { | ||
62 | + USE_FOR_MMU(IF_FEATURE_SEAMLESS_XZ(xformer = unpack_xz_stream;)) | ||
63 | USE_FOR_NOMMU(xformer_prog = "unxz";) | ||
64 | + } | ||
65 | |||
66 | fork_transformer_with_sig(tar_handle->src_fd, xformer, xformer_prog); | ||
67 | /* Can't lseek over pipes */ | ||
68 | -- | ||
69 | 2.7.4 | ||
70 | |||
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb index 1baadeacd7..d3df448557 100644 --- a/meta/recipes-core/busybox/busybox_1.24.1.bb +++ b/meta/recipes-core/busybox/busybox_1.24.1.bb | |||
@@ -58,6 +58,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ | |||
58 | file://0001-libiproute-handle-table-ids-larger-than-255.patch \ | 58 | file://0001-libiproute-handle-table-ids-larger-than-255.patch \ |
59 | file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \ | 59 | file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \ |
60 | file://BUG9071_buffer_overflow_arp.patch \ | 60 | file://BUG9071_buffer_overflow_arp.patch \ |
61 | file://busybox-tar-add-IF_FEATURE_-checks.patch \ | ||
61 | " | 62 | " |
62 | SRC_URI_append_libc-musl = " file://musl.cfg " | 63 | SRC_URI_append_libc-musl = " file://musl.cfg " |
63 | 64 | ||