From 70c8503abe400fbc4142b96ff2583d059a0d1aaa Mon Sep 17 00:00:00 2001 From: Frank Hunleth Date: Tue, 21 Jun 2016 13:08:17 -0400 Subject: [PATCH] toolchain: allow crosstool-ng musl toolchains Currently, if using a crosstool-ng-generated external musl toolchain, Buildroot exits with "Incorrect selection of the C library". The musl.codu.org cross-compilers put their libraries in /lib while crosstool-ng uses /usr/lib. This change checks that location for libc.so as well. Signed-off-by: Frank Hunleth --- toolchain/helpers.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 3991bc1..72d11c7 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -210,7 +210,7 @@ check_glibc = \ # $1: sysroot directory check_musl = \ SYSROOT_DIR="$(strip $1)"; \ - if test ! -f $${SYSROOT_DIR}/lib/libc.so -o -e $${SYSROOT_DIR}/lib/libm.so ; then \ + if test ! \( -f $${SYSROOT_DIR}/lib/libc.so -o -f $${SYSROOT_DIR}/usr/lib/libc.so \) -o -e $${SYSROOT_DIR}/lib/libm.so ; then \ echo "Incorrect selection of the C library" ; \ exit -1; \ fi -- 2.7.4