From: Markus Mayer <mmayer@broadcom.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC 0/6] Support 32-bit binaries on a 64-bit architecture
Date: Thu, 15 Feb 2018 16:56:06 -0800 [thread overview]
Message-ID: <20180216005612.69593-1-mmayer@broadcom.com> (raw)
This series contains a proposal for supporting 32-bit libraries and
binaries on a 64-bit platform.
There are some limitations and prerequisites as to the scope this has
been tested.
- It has only been tested on ARM/ARM64.
- It has only been tested with an external toolchain
(https://github.com/Broadcom/stbgcc-6.3/releases).
- It requires that the Aarch64 compiler be compiled with "multi-lib"
enabled. This ensures that the sysroot doesn't contain a lib64 ->
lib symlink. Instead, lib and lib64 are separate directories.
- It has only been tested with a fairly limited number of packages.
There might be other packages that don't correctly pass --libdir,
similar to bzip2 as mentioned below.
The patches in this series make the following changes, in this order:
- ensure that check-bin-arch allows Aarch32 binaries on Aarch64
- introduce some new BR2 configuration variables (primarily for the
32-bit sysroot location on the host and where system libraries live
by default on the target)
- tell the Buildroot core not to create lib32 or lib64 symlink when
32-bit support is enabled
- tell the Buildroot core to copy the 32-bit sysroot when 32-bit support
is enabled
- introduce the $(LIBDIR) variable to the bzip2 package, so we can tell
it that libbz2.so should go in /usr/lib64 when that is desired
- modify the package core to pass /usr/lib (or /usr/lib64) as the library
location for the system
The result is that all 64-bit shared libraries should be installed into
/usr/lib64. The 32-bit libraries are copied from the 32-bit sysroot on
the host into /usr/lib.
I am quite certain this submission will only be a first step, but it does
look like there are others who are faced with the same issue.
Markus Mayer (6):
support/scripts/check-bin-arch: improve architecture check
system/Config.in: add configuration options for 32-bit library support
core: system and toolchain: 32-bit run-time support on 64-bit platform
core/pkg-toolchain-external: copy external 32-bit libraries to staging
bzip2: introduce make variable $(LIBDIR)
package: use BR2_ROOTFS_LIB_DIR for all libraries we use
package/bzip2/0003-add-libdir-to-makefile.patch | 36 ++++++++++++++++++++++
.../bzip2/0004-add-libdir-to-makefile-libbz2.patch | 31 +++++++++++++++++++
package/bzip2/bzip2.mk | 4 ++-
package/dmalloc/dmalloc.mk | 7 +++--
package/e2fsprogs/e2fsprogs.mk | 2 ++
package/libzlib/libzlib.mk | 3 +-
package/linux-tools/linux-tool-cpupower.mk.in | 7 ++++-
package/pciutils/pciutils.mk | 2 ++
package/pkg-autotools.mk | 1 +
package/readline/readline.mk | 2 +-
support/scripts/check-bin-arch | 15 +++++++++
system/Config.in | 34 ++++++++++++++++++++
system/system.mk | 11 ++++++-
.../toolchain-external/pkg-toolchain-external.mk | 13 +++++++-
15 files changed, 161 insertions(+), 10 deletions(-)
create mode 100644 package/bzip2/0003-add-libdir-to-makefile.patch
create mode 100644 package/bzip2/0004-add-libdir-to-makefile-libbz2.patch
--
2.7.4
next reply other threads:[~2018-02-16 0:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 0:56 Markus Mayer [this message]
2018-02-16 0:56 ` [Buildroot] [RFC 1/6] support/scripts/check-bin-arch: improve architecture check Markus Mayer
2018-02-16 0:56 ` [Buildroot] [RFC 2/6] system/Config.in: add configuration options for 32-bit library support Markus Mayer
2018-02-16 0:56 ` [Buildroot] [RFC 3/6] core: system and toolchain: 32-bit run-time support on 64-bit platform Markus Mayer
2018-02-16 0:56 ` [Buildroot] [RFC 4/6] core/pkg-toolchain-external: copy external 32-bit libraries to staging Markus Mayer
2018-02-16 0:56 ` [Buildroot] [RFC 5/6] bzip2: introduce make variable $(LIBDIR) Markus Mayer
2018-02-16 0:56 ` [Buildroot] [RFC 6/6] package: use BR2_ROOTFS_LIB_DIR for all libraries we use Markus Mayer
2018-02-16 6:45 ` [Buildroot] [RFC 0/6] Support 32-bit binaries on a 64-bit architecture Baruch Siach
2018-02-16 20:59 ` Thomas Petazzoni
2018-02-16 23:00 ` Florian Fainelli
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=20180216005612.69593-1-mmayer@broadcom.com \
--to=mmayer@broadcom.com \
--cc=buildroot@busybox.net \
/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