X-Git-Url: https://git.archive.openwrt.org/?p=openwrt.git;a=blobdiff_plain;f=scripts%2Fext-toolchain.sh;h=a552fbe3fcce3dfff791cc1ce65fdd8e70ace1aa;hp=a34ef0677335cc9e5a3bd52e011444fff9754292;hb=104549a1b6cb24f16942a1f448e1a3bc3624bab7;hpb=5a89e8c08e58eb7905b29730f752ed39cffa2b91 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