aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ext-toolchain.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh
index 1f8eca3076..fe1024c18e 100755
--- a/scripts/ext-toolchain.sh
+++ b/scripts/ext-toolchain.sh
@@ -369,8 +369,18 @@ print_config() {
echo "CONFIG_TOOLCHAIN_PREFIX=\"$prefix\"" >> "$config"
echo "CONFIG_TARGET_NAME=\"$target\"" >> "$config"
- if [ "$LIBC_TYPE" != glibc ]; then
- echo "CONFIG_TOOLCHAIN_LIBC=\"$LIBC_TYPE\"" >> "$config"
+ if [ -f "$config" ]; then
+ sed -i '/CONFIG_EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL/d' "$config"
+ sed -i '/CONFIG_EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC/d' "$config"
+ fi
+
+ if [ "$LIBC_TYPE" == glibc ]; then
+ echo "CONFIG_EXTERNAL_TOOLCHAIN_LIBC_USE_GLIBC=y" >> "$config"
+ elif [ "$LIBC_TYPE" == musl ]; then
+ echo "CONFIG_EXTERNAL_TOOLCHAIN_LIBC_USE_MUSL=y" >> "$config"
+ else
+ echo "Can't detect LIBC type. Aborting!" >&2
+ return 1
fi
local lib