From: "André Draszik" <git@andred.net>
To: openembedded-core@lists.openembedded.org
Subject: [pyro][PATCH 02/17] busybox: fix a linking issue
Date: Fri, 6 Oct 2017 13:12:44 +0100 [thread overview]
Message-ID: <20171006121259.5817-3-git@andred.net> (raw)
In-Reply-To: <20171006121259.5817-1-git@andred.net>
From: Ming Liu <peter.x.liu@external.atlascopco.com>
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.
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 789254b5ae983a94346f53de18286713b80eb5f2)
Signed-off-by: André Draszik <adraszik@tycoint.com>
---
.../busybox-tar-add-IF_FEATURE_-checks.patch | 70 ++++++++++++++++++++++
meta/recipes-core/busybox/busybox_1.24.1.bb | 1 +
2 files changed, 71 insertions(+)
create mode 100644 meta/recipes-core/busybox/busybox/busybox-tar-add-IF_FEATURE_-checks.patch
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 @@
+From f94412f6bb49136694c5478d0aecb19118d1b08d Mon Sep 17 00:00:00 2001
+From: Ming Liu <peter.x.liu@external.atlascopco.com>
+Date: Wed, 31 May 2017 11:48:09 +0200
+Subject: [PATCH] tar: add IF_FEATURE_* checks
+
+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.
+
+Upstream-Status: Pending [ Sent to busybox upstream on 2017-06-02 ]
+
+Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
+---
+ archival/tar.c | 25 +++++++++++++++----------
+ 1 file changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/archival/tar.c b/archival/tar.c
+index b70e00a..7598b71 100644
+--- a/archival/tar.c
++++ b/archival/tar.c
+@@ -1216,21 +1216,26 @@ int tar_main(int argc UNUSED_PARAM, char **argv)
+ USE_FOR_MMU(IF_DESKTOP(long long) int FAST_FUNC (*xformer)(transformer_state_t *xstate);)
+ USE_FOR_NOMMU(const char *xformer_prog;)
+
+- if (opt & OPT_COMPRESS)
+- USE_FOR_MMU(xformer = unpack_Z_stream;)
++ if (opt & OPT_COMPRESS) {
++ USE_FOR_MMU(IF_FEATURE_SEAMLESS_Z(xformer = unpack_Z_stream;))
+ USE_FOR_NOMMU(xformer_prog = "uncompress";)
+- if (opt & OPT_GZIP)
+- USE_FOR_MMU(xformer = unpack_gz_stream;)
++ }
++ if (opt & OPT_GZIP) {
++ USE_FOR_MMU(IF_FEATURE_SEAMLESS_GZ(xformer = unpack_gz_stream;))
+ USE_FOR_NOMMU(xformer_prog = "gunzip";)
+- if (opt & OPT_BZIP2)
+- USE_FOR_MMU(xformer = unpack_bz2_stream;)
++ }
++ if (opt & OPT_BZIP2) {
++ USE_FOR_MMU(IF_FEATURE_SEAMLESS_BZ2(xformer = unpack_bz2_stream;))
+ USE_FOR_NOMMU(xformer_prog = "bunzip2";)
+- if (opt & OPT_LZMA)
+- USE_FOR_MMU(xformer = unpack_lzma_stream;)
++ }
++ if (opt & OPT_LZMA) {
++ USE_FOR_MMU(IF_FEATURE_SEAMLESS_LZMA(xformer = unpack_lzma_stream;))
+ USE_FOR_NOMMU(xformer_prog = "unlzma";)
+- if (opt & OPT_XZ)
+- USE_FOR_MMU(xformer = unpack_xz_stream;)
++ }
++ if (opt & OPT_XZ) {
++ USE_FOR_MMU(IF_FEATURE_SEAMLESS_XZ(xformer = unpack_xz_stream;))
+ USE_FOR_NOMMU(xformer_prog = "unxz";)
++ }
+
+ fork_transformer_with_sig(tar_handle->src_fd, xformer, xformer_prog);
+ /* Can't lseek over pipes */
+--
+2.7.4
+
diff --git a/meta/recipes-core/busybox/busybox_1.24.1.bb b/meta/recipes-core/busybox/busybox_1.24.1.bb
index e26dfff776..a97847d7c6 100644
--- a/meta/recipes-core/busybox/busybox_1.24.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -57,6 +57,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
file://0001-libiproute-handle-table-ids-larger-than-255.patch \
file://ifupdown-pass-interface-device-name-for-ipv6-route-c.patch \
file://BUG9071_buffer_overflow_arp.patch \
+ file://busybox-tar-add-IF_FEATURE_-checks.patch \
"
SRC_URI_append_libc-musl = " file://musl.cfg "
--
2.14.2
next prev parent reply other threads:[~2017-10-06 12:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 12:12 [pyro] some backported patches André Draszik
2017-10-06 12:12 ` [pyro][PATCH 01/17] gdb: fix gdbserver not working in musl/mips context André Draszik
2017-10-06 12:12 ` André Draszik [this message]
2017-10-06 12:12 ` [pyro][PATCH 03/17] busybox: add backported patch to support iproute 'scope' André Draszik
2017-10-06 12:12 ` [pyro][PATCH 04/17] openssh: allow to override OpenSSL HostKeys when read-only-rootfs André Draszik
2017-10-06 13:38 ` Joshua Watt
2017-10-06 12:12 ` [pyro][PATCH 05/17] selftest/archiver: add tests for recipe type filtering André Draszik
2017-10-06 12:12 ` [pyro][PATCH 06/17] selftest/archiver: only execute deploy_archives task André Draszik
2017-10-06 12:12 ` [pyro][PATCH 07/17] copyleft_filter.bbclass: restore possiblity to filter on type André Draszik
2017-10-06 12:12 ` [pyro][PATCH 08/17] debianutils: Add a native version (for run-parts) André Draszik
2017-10-06 12:12 ` [pyro][PATCH 09/17] ca-certificates: Fix postinst dependency issues André Draszik
2017-10-06 12:12 ` [pyro][PATCH 10/17] kernel-uimage.bbclass: Fix up generation of uImage from vmlinux André Draszik
2017-10-06 12:12 ` [pyro][PATCH 11/17] kernel-fitimage: sanitize dtb section name (unbreak MIPS) André Draszik
2017-10-06 12:12 ` [pyro][PATCH 12/17] kernel-fitimage: unbreak UBOOT_ENTRYSYMBOL support André Draszik
2017-10-06 12:12 ` [pyro][PATCH 13/17] kernel-uimage: optimise " André Draszik
2017-10-06 12:12 ` [pyro][PATCH 14/17] kernel-uboot: support compressed kernel on MIPS André Draszik
2017-10-06 12:12 ` [pyro][PATCH 15/17] kernel-fitimage: support MIPS (compressed) André Draszik
2017-10-06 12:12 ` [pyro][PATCH 16/17] curl: enable threaded resolver André Draszik
2017-10-06 12:12 ` [pyro][PATCH 17/17] useradd-staticids: don't create username-group if gid is specified André Draszik
2017-10-10 14:58 ` [pyro] some backported patches akuster808
2017-10-18 7:05 ` André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171006121259.5817-3-git@andred.net \
--to=git@andred.net \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox