diff options
author | Mike Crowe <mac@mcrowe.com> | 2019-02-24 21:00:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-26 23:04:31 +0000 |
commit | dda95279a7c428934a67dc2db03b8c3e5d72b914 (patch) | |
tree | 61331611aa307cc408311b197d99ecd05ee568aa /documentation/adt-manual/adt-style.css | |
parent | 10a97f71af1db23a4e1fa1a6364bf479d2973476 (diff) | |
download | poky-dda95279a7c428934a67dc2db03b8c3e5d72b914.tar.gz |
glibc: Install AArch64 loader link correctly for usrmerge+multilib
The AArch64 little-endian ABI requires that the dynamic loader is always
available at /lib/ld-linux-aarch64.so.1. Similarly, the big-endian ABI
requires that the dynamic loader is always available at
/lib/ld-linux-aarch64_be.so.1.
glibc-package.inc contains code that tries to ensure this, but
unfortunately it is defeated by the combination of multilib and usrmerge
because it does not take into account that /lib is the same as /usr/lib
with usrmerge when it adds the loader path to libc_baselibs and when it
attempts to show that /usr/lib is empty in do_poststash_install_cleanup.
This results in the symlink not being included in the package and a build
failure due to rmdir failing.
Richard Purdie also suggested[1] that ${nonarch_base_libdir} should not be
used as a synonym for /lib in this case.
This hopefully-fixed version always sets ARCH_DYNAMIC_LOADER and then uses
${root_prefix}/lib/${ARCH_DYNAMIC_LOADER} to refer to the dynamic loader
which works with both multilib and usrmerge. Since ARCH_DYNAMIC_LOADER is
only non-empty if the symlink is required, the code to create it can move
to do_install_append. Then do_poststash_install_cleanup needs to be taught
that ${exec_prefix}/lib may not be empty if the dynamic loader symlink is
there.
It appears not to be possible to specify the name of the loader via a
variable with an override, since the _aarch64 override is applied even for
_aarch64-be, so I've set the loader name using ${TARGET_ARCH} instead.
Build-tested and inspected core-image-minimal rootfs with:
* AArch64 no multilib (real loader in correct place)
MACHINE = "qemuarm64"
* AArch64 multilib (symlink in correct place)
MACHINE = "qemuarm64"
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
require conf/multilib.conf
* AArch64 usrmerge (real loader in correct place)
DISTRO_FEATURES += "usrmerge"
MACHINE = "qemuarm64"
* AArch64 multilib usrmerge (symlink in correct place)
DISTRO_FEATURES += "usrmerge"
MACHINE = "qemuarm64"
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "armv7at-neon"
require conf/multilib.conf
* big-endian versions of all of the above by also setting
DEFAULTTUNE = "aarch64_be".
(building glibc only.)
* x86_64 (real loader in /lib as before)[2]
MACHINE = "qemux86"
* x86_64 multilib (real loader in /lib64 as before)
MACHINE="qemux86-64"
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
require conf/multilib.conf
I also tested leaving an unwanted file in ${exec_prefix}/lib for
do_poststash_install_cleanup to detect, and I believe the detection always
worked correctly.
[1] http://lists.openembedded.org/pipermail/openembedded-core/2018-November/276120.html
(From OE-Core rev: a705c0782c863ee960d65b5109168a4587a0a7b7)
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/adt-manual/adt-style.css')
0 files changed, 0 insertions, 0 deletions