Go to file
Thomas Petazzoni 32bec8ee2f toolchain-external: copy ld*.so* for all C libraries
Currently, for the dynamic loader, we're copying ld*.so* for glibc and
uClibc, except for glibc/EABIhf where we are explicitly copying
ld-linux-armhf.so.*. For musl, we're not copying the dynamic linker
because it's simply a symbolic link to libc.so. However, the name of
the musl dynamic linker changes from one architecture to the other,
and we don't handle all cases.

Since handling the musl dynamic linker symlink creation is becoming
more and more annoying to maintain, this commit makes musl use the
same mechanism as glibc/uClibc: put the dynamic linker in
TOOLCHAIN_EXTERNAL_LIBS.

In addition, the special condition on glibc/EABIhf was added in
11ec38b695 ("toolchain-external: fix
Linaro ARM toolchain support") because an old Linaro toolchain had two
dynamic loaders, and we wanted to copy only one. But 1/ this is old
and 2/ having the two dynamic linkers doesn't really matter.

So this commit simply unconditionally adds "ld*.so*" to
TOOLCHAIN_EXTERNAL_LIBS, regardless of the C library being chosen. It
re-uses the musl dynamic linker symlink from the sysroot, which makes
it always correct, and allows us to remove the
TOOLCHAIN_EXTERNAL_MUSL_LD_LINK hook, and all the related logic.

This commit therefore solves two problems with the musl dynamic linker
symbolic link creation logic:

 1 We support all architectures, without having to hardcode in
   Buildroot the mapping between the CPU architecture and the
   corresponding dynamic linker name. For example, our current logic
   was not handling the mips64+n32 ABI case, where the dynamic linker
   is named ld-musl-mipsn32el.so.1.

 2 We support Crosstool-NG musl toolchains, where the dynamic linker
   is in /lib, but libc.so is in /usr/lib.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
This commit therefore replaces:

 - https://patchwork.ozlabs.org/patch/780411/ (was another solution
   for solving problem 1 above)

 - https://patchwork.ozlabs.org/patch/763977/ and
   https://patchwork.ozlabs.org/patch/748974/ (was another solution
   for solving problem 2 above)
2017-07-05 12:20:05 +02:00
arch arch, linux, package: remove whitespaces 2017-03-29 23:30:37 +02:00
board olimex_a20: refactor with genimage.sh 2017-07-02 00:37:59 +02:00
boot syslinux: drop patch 0003, not needed after gnu-efi update 2017-07-04 18:45:26 +02:00
configs configs/{at91sam9x5ek*, atmel_*_xplained*}: U-Boot needs DTC 2017-07-02 15:48:05 +02:00
docs docs/manual: update gettext details 2017-07-05 01:37:38 +02:00
fs fs/ext2: use mkfs to generate rootfs image 2017-07-05 00:39:38 +02:00
linux linux: bump default version to 4.11.8 2017-07-01 13:18:09 +02:00
package pkg-rebar: use $(HOST_DIR) instead of $(HOST_DIR)/usr as prefix 2017-07-05 11:50:51 +02:00
support support/testing: add tests for musl and uclibc toolchains 2017-07-05 12:20:05 +02:00
system package/ifupdown-scripts: new package 2017-07-04 23:38:18 +02:00
toolchain toolchain-external: copy ld*.so* for all C libraries 2017-07-05 12:20:05 +02:00
utils utils/brmake: print the error code of the build 2017-07-05 00:15:05 +02:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.gitignore update gitignore 2013-05-04 12:41:55 +02:00
.gitlab-ci.yml support/testing: add tests for musl and uclibc toolchains 2017-07-05 12:20:05 +02:00
.gitlab-ci.yml.in .gitlab-ci.yml: use the Buildroot CI image published on Docker Hub 2017-07-02 23:45:27 +02:00
CHANGES CHANGES: add details on the gettext revamp 2017-07-05 01:37:42 +02:00
Config.in core: change the strip command from a choice to a boolean 2017-07-01 15:07:25 +02:00
Config.in.legacy package/mke2img: remove package 2017-07-05 00:54:01 +02:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS package/mke2img: remove package 2017-07-05 00:54:01 +02:00
Makefile Makefile: remove $(HOST_DIR)/usr from BR_PATH 2017-07-05 11:46:15 +02:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README README: add reference to submitting-patches 2016-02-01 19:16:08 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches