summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-09-06 23:22:37 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2011-09-06 23:22:37 (GMT)
commit8764d8089bb0d447f82d43d3a5eb0cdb357e0a00 (patch)
treeda6987a2520acdfc843b05ff8e9500d8c63eb14b
parent3bcc156ec099e8d788759634938412a11f627f1e (diff)
scripts: fix sysroot prefix dir
The sysroot prefix dir was broken in #4960f5d9f829 due to a mishap when making the out-of-sysroot lib/ symlink: the './' was mistakenly changed into a single '.' . Although Jonathan suggested restoring the missing '/' to restore it to normal operation, I prefered using an explicit pushd/popd to be extra sure of the symlink location and target, along with a fix in the sysroot relative directory calculation. Reported-by: Jonathan Grundon <JGrundon@xos.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from e5fc5c9ea78af28d05244ba09cf718cf75470903)
-rw-r--r--scripts/crosstool-NG.sh.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 509a74b..7d93ec8 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -273,7 +273,7 @@ if [ -z "${CT_RESTART}" ]; then
# Arrange paths depending on wether we use sysroot or not.
if [ "${CT_USE_SYSROOT}" = "y" ]; then
- CT_SYSROOT_REL_DIR="${CT_SYSROOT_DIR_PREFIX}/${CT_SYSROOT_NAME}"
+ CT_SYSROOT_REL_DIR="${CT_SYSROOT_DIR_PREFIX:+${CT_SYSROOT_DIR_PREFIX}/}${CT_SYSROOT_NAME}"
CT_SYSROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_REL_DIR}"
CT_DEBUGROOT_DIR="${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/debug-root"
CT_HEADERS_DIR="${CT_SYSROOT_DIR}/usr/include"
@@ -317,7 +317,9 @@ if [ -z "${CT_RESTART}" ]; then
if [ "${CT_USE_SYSROOT}" = "y" ]; then
# Prevent gcc from installing its libraries outside of the sysroot
- CT_DoExecLog ALL ln -sf ".${CT_SYSROOT_REL_DIR}/lib" "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
+ CT_Pushd "${CT_PREFIX_DIR}/${CT_TARGET}"
+ CT_DoExecLog ALL ln -sf "${CT_SYSROOT_REL_DIR}/lib" "lib"
+ CT_Popd
fi
# Since we're *not* multilib on the target side, we want all the