buildroot/toolchain/toolchain-external
Thomas Petazzoni d67cebcda0 toolchain: improve musl check to support static toolchains
The check_musl function currently builds a program and verifies if the
program interpreter starts with /lib/ld-musl. While this works fine
for dynamically linked programs, this obviously doesn't work for a
purely static musl toolchain such as [1].

There is no easy way to identify a toolchain as using the musl C
library. For glibc, dynamic linking is always supported, so we look at
the dynamic linker name. For uClibc, there is a distinctive
uClibc_config.h header file. There is no such distinctive feature in
musl.

We end up resorting to looking for the string MUSL_LOCPATH, which is
used by musl locale_map.c source file. This string has been present in
musl since 2014. It certainly isn't a very stable or convincing
solution to identify the C library as being musl, but it's the best we
could find.

Note that we are sure there is a libc.a file, because the
check_unusable_toolchain function checks that there is a such a file.

[1] http://autobuild.buildroot.net/toolchains/tarballs/br-arm-musl-static-2018.05.tar.bz2

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-21 22:11:51 +02:00
..
toolchain-external-codescape-img-mips toolchain/*/Config.in: re-wrap help text 2018-04-01 09:08:47 +02:00
toolchain-external-codescape-mti-mips toolchain/*/Config.in: re-wrap help text 2018-04-01 09:08:47 +02:00
toolchain-external-codesourcery-aarch64 toolchain/external: hide versions too old for the current arch 2017-11-24 22:16:19 +01:00
toolchain-external-codesourcery-amd64 toolchain/external: hide versions too old for the current arch 2017-11-24 22:16:19 +01:00
toolchain-external-codesourcery-arm arch/arm: armv8 is really armv8a 2017-11-24 23:01:41 +01:00
toolchain-external-codesourcery-mips toolchain/external: hide versions too old for the current arch 2017-11-24 22:16:19 +01:00
toolchain-external-codesourcery-niosII toolchain-external: bump CodeSourcery NIOSII to 2018.05 2018-05-30 22:51:29 +02:00
toolchain-external-custom toolchain: add 4.17.x choice for headers 2018-06-04 22:44:42 +02:00
toolchain-external-linaro-aarch64 toolchain-external: bump version of Linaro AArch64 toolchain to 7.3-2018.05 2018-06-23 17:19:40 +02:00
toolchain-external-linaro-aarch64-be toolchain-external-linaro-aarch64-be: new package 2018-06-28 22:15:55 +02:00
toolchain-external-linaro-arm toolchain-external: bump version of Linaro ARM toolchain to 7.3-2018.05 2018-06-23 17:20:09 +02:00
toolchain-external-linaro-armeb toolchain-external: bump version of Linaro ARMeb toolchain to 7.3-2018.05 2018-06-23 17:20:19 +02:00
toolchain-external-synopsys-arc toolchain: bump ARC prebuild toolchain to arc-2018.03 2018-06-28 21:38:58 +02:00
Config.in toolchain-external-linaro-aarch64-be: new package 2018-06-28 22:15:55 +02:00
pkg-toolchain-external.mk toolchain: improve musl check to support static toolchains 2018-08-21 22:11:51 +02:00
toolchain-external.mk Fix makefile include order by using sort/wildcard. 2017-11-24 00:08:23 +01:00