scripts: squash the multi-slash in the sysroot symlink
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Jan 26 19:13:18 2011 +0100 (2011-01-26)
changeset 22864960f5d9f829
parent 2285 7d1e018167b5
child 2287 61608c9365ab
scripts: squash the multi-slash in the sysroot symlink

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Sat Jan 29 00:57:02 2011 +0100
     1.2 +++ b/scripts/crosstool-NG.sh.in	Wed Jan 26 19:13:18 2011 +0100
     1.3 @@ -292,10 +292,11 @@
     1.4  
     1.5      # Arrange paths depending on wether we use sysroot or not.
     1.6      if [ "${CT_USE_SYSROOT}" = "y" ]; then
     1.7 -        CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/${CT_SYSROOT_NAME}"
     1.8 +        CT_SYSROOT_REL_DIR="${CT_SYSROOT_DIR_PREFIX}/${CT_SYSROOT_NAME}"
     1.9 +        CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_REL_DIR}"
    1.10          CT_DEBUGROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/debug-root"
    1.11          CT_HEADERS_DIR="${CT_SYSROOT_DIR}/usr/include"
    1.12 -        CT_SanitiseVarDir CT_SYSROOT_DIR CT_DEBUGROOT_DIR CT_HEADERS_DIR 
    1.13 +        CT_SanitiseVarDir CT_SYSROOT_REL_DIR CT_SYSROOT_DIR CT_DEBUGROOT_DIR CT_HEADERS_DIR 
    1.14          BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
    1.15          CC_CORE_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
    1.16          CC_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
    1.17 @@ -335,7 +336,7 @@
    1.18  
    1.19      if [ "${CT_USE_SYSROOT}" = "y" ]; then
    1.20          # Prevent gcc from installing its libraries outside of the sysroot
    1.21 -        CT_DoExecLog ALL ln -sf "./${CT_SYSROOT_DIR_PREFIX}/${CT_SYSROOT_NAME}/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
    1.22 +        CT_DoExecLog ALL ln -sf ".${CT_SYSROOT_REL_DIR}/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
    1.23      fi
    1.24  
    1.25      # Since we're *not* multilib on the target side, we want all the