Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] Solving the musl dynamic linker issues
@ 2017-07-02 13:41 Thomas Petazzoni
  2017-07-02 13:41 ` [Buildroot] [PATCH 1/4] support/testing: add tests for musl and uclibc toolchains Thomas Petazzoni
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Thomas Petazzoni @ 2017-07-02 13:41 UTC (permalink / raw)
  To: buildroot

Hello,

We currently have two outstanding musl dynamic linker issues:

 1. We don't handle all musl dynamic linker names for all
    architectures. I proposed a patch solving this at
    https://patchwork.ozlabs.org/patch/780411/, where the approach was
    to build a dummy program and use readelf to find the dynamic
    linker name, and therefore the symlink to libc.so that we need to
    create.

 2. We don't support Crosstool-NG musl toolchains, because they put
    libc.so in /usr/lib and not /lib, and therefore our current
    creation logic that makes the dynamic linker point to /lib/libc.so
    incorrect. Ilya Kuzmich <ilya.kuzmich@gmail.com> proposed patches
    (https://patchwork.ozlabs.org/patch/763977/
    https://patchwork.ozlabs.org/patch/748974/) to solve this.

After discussion with Arnout, we realized that all our messy logic for
creating the musl dynamic linker symbolic link is useless. The correct
symbolic link already exists in the original toolchain sysroot, so we
should just copy it from the sysroot, just like we do for glibc/uClibc.

This series of patches implements just that, with the main patch being
PATCH 3/4.

The first patch just adds more external toolchain tests to our runtime
tests infrastructure, to validate that the changes in this series
don't break things.

The second patch prepares the copy_toolchain_lib_root for copying a
symlink in /lib that potentially points to a file in /usr/lib (which
it currently doesn't handle).

The third patch is the core of the solution, basically putting ld*.so*
unconditionally in TOOLCHAIN_EXTERNAL_LIBS.

The fourth patch is a minor refactoring.

Thanks,

Thomas

Thomas Petazzoni (4):
  support/testing: add tests for musl and uclibc toolchains
  toolchain/helpers.mk: re-evaluate DESTDIR in copy_toolchain_lib_root
  toolchain-external: copy ld*.so* for all C libraries
  toolchain-external: also put libgcc_s.so unconditionally in
    TOOLCHAIN_EXTERNAL_LIBS

 support/testing/tests/toolchain/test_external.py   | 75 ++++++++++++++++++++++
 toolchain/helpers.mk                               |  2 +-
 .../toolchain-external/pkg-toolchain-external.mk   | 36 ++---------
 3 files changed, 81 insertions(+), 32 deletions(-)

-- 
2.9.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-07-05 10:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-02 13:41 [Buildroot] [PATCH 0/4] Solving the musl dynamic linker issues Thomas Petazzoni
2017-07-02 13:41 ` [Buildroot] [PATCH 1/4] support/testing: add tests for musl and uclibc toolchains Thomas Petazzoni
2017-07-02 13:43   ` Thomas Petazzoni
2017-07-03 13:15   ` Arnout Vandecappelle
2017-07-02 13:41 ` [Buildroot] [PATCH 2/4] toolchain/helpers.mk: re-evaluate DESTDIR in copy_toolchain_lib_root Thomas Petazzoni
2017-07-02 13:41 ` [Buildroot] [PATCH 3/4] toolchain-external: copy ld*.so* for all C libraries Thomas Petazzoni
2017-07-02 13:49   ` Baruch Siach
2017-07-02 19:21   ` Thomas De Schampheleire
2017-07-02 21:51     ` Thomas Petazzoni
2017-07-02 13:41 ` [Buildroot] [PATCH 4/4] toolchain-external: also put libgcc_s.so unconditionally in TOOLCHAIN_EXTERNAL_LIBS Thomas Petazzoni
2017-07-05 10:24 ` [Buildroot] [PATCH 0/4] Solving the musl dynamic linker issues Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox