toolchain-external: improve musl external check
authorIlya Kuzmich <ilya.kuzmich@gmail.com>
Mon, 20 Mar 2017 05:56:10 +0000 (08:56 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 26 Mar 2017 13:21:38 +0000 (15:21 +0200)
commit3b328897f5d86b3607e89ae2134319fc2c881b16
tree65374a151b6ed3d4d79d2ef703f4db3144a84963
parent9397bd643d2f64bd61843addd238ccee9ce66b1f
toolchain-external: improve musl external check

The current test to verify if the toolchain uses musl or not is based on
checking if /lib/libc.so or /lib/libm.so exist in the sysroot. However,
some toolchains (notably Crosstool-NG ones) put these libraries in
/usr/lib/.

To fix this, build a minimal C program and check if the program
interpreter contains /lib/ld-musl.

Signed-off-by: Ilya Kuzmich <ilya.kuzmich@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
toolchain/helpers.mk
toolchain/toolchain-external/pkg-toolchain-external.mk