X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=scripts%2Fext-toolchain.sh;h=a552fbe3fcce3dfff791cc1ce65fdd8e70ace1aa;hb=86625a148abb04a1e6fee39ddab48256b65fa1f4;hp=a34ef0677335cc9e5a3bd52e011444fff9754292;hpb=c21b5cc34ab2b8f28b914ed9318b4f6f046a5b7b;p=openwrt%2Fstaging%2Fmkresin.git diff --git a/scripts/ext-toolchain.sh b/scripts/ext-toolchain.sh index a34ef06773..a552fbe3fc 100755 --- a/scripts/ext-toolchain.sh +++ b/scripts/ext-toolchain.sh @@ -91,7 +91,7 @@ test_uclibc() { local sysroot="$("$CC" $CFLAGS -print-sysroot 2>/dev/null)" if [ -d "${sysroot:-$TOOLCHAIN}" ]; then local lib - for lib in "${sysroot:-$TOOLCHAIN}"/{lib,usr/lib,usr/local/lib}/ld-uClibc*.so*; do + for lib in "${sysroot:-$TOOLCHAIN}"/{lib,usr/lib,usr/local/lib}/ld*-uClibc*.so*; do if [ -f "$lib" ] && [ ! -h "$lib" ]; then return 0 fi @@ -221,7 +221,7 @@ wrap_bin_ld() { local bin="$2" echo '#!/bin/sh' > "$out" - echo -n 'exec "'"$bin"'" '"$CFLAGS"' ${STAGING_DIR:+' >> "$out" + echo -n 'exec "'"$bin"'" ${STAGING_DIR:+' >> "$out" echo -n '-L "$STAGING_DIR/usr/lib" ' >> "$out" echo '-rpath-link "$STAGING_DIR/usr/lib"} "$@"' >> "$out" @@ -356,6 +356,10 @@ 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" + fi + local lib for lib in C RT PTHREAD GCC STDCPP SSP GFORTRAN; do local file