diff options
author | Alexey Neyman <stilor@att.net> | 2018-09-27 21:43:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-27 21:43:04 (GMT) |
commit | 5f18c3ed4e3af50f18985def9d7d1f640fd9577f (patch) | |
tree | a3cbbcb1be68012b2ae97147446c8d58178fdb28 /scripts/crosstool-NG.sh | |
parent | f7c2952419bd8aae95169ea1e95f6e327b28d62b (diff) | |
parent | 2acab2f06197ab34243fc415020ead54d4a9e505 (diff) |
Merge pull request #1036 from stilor/small-fixes
Small fixes
Diffstat (limited to 'scripts/crosstool-NG.sh')
-rw-r--r-- | scripts/crosstool-NG.sh | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index 486f733..fb6856e 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -74,6 +74,7 @@ for d in \ LOCAL_TARBALLS \ WORK \ PREFIX \ + BUILD_TOP \ INSTALL \ ; do eval dir="\${CT_${d}_DIR}" @@ -88,6 +89,17 @@ for d in \ CT_Abort "'CT_${d}_DIR'='${dir}' contains a comma in it.\nDon't use commas in paths, it breaks things." ;; esac + case "${dir}" in + /*) + # Absolute path, okay + ;; + *) + # Relative path from CT_TOP_DIR, make absolute + eval CT_${d}_DIR="${CT_TOP_DIR}/${dir}" + # Having .. inside CT_PREFIX breaks relocatability. + CT_SanitizeVarDir CT_${d}_DIR + ;; + esac done # Where will we work? @@ -304,20 +316,17 @@ CT_DoExecLog ALL mkdir -p "${CT_HOST_COMPLIBS_DIR}" # Only create the state dir if asked for a restartable build [ -n "${CT_DEBUG_CT_SAVE_STEPS}" ] && CT_DoExecLog ALL mkdir -p "${CT_STATE_DIR}" +# Kludge: CT_PREFIX_DIR might have grown read-only if +# the previous build was successful. +CT_DoExecLog ALL chmod -R u+w "${CT_PREFIX_DIR}" + # Check install file system case-sensitiveness CT_DoExecLog DEBUG touch "${CT_PREFIX_DIR}/foo" CT_TestAndAbort "Your file system in '${CT_PREFIX_DIR}' is *not* case-sensitive!" -f "${CT_PREFIX_DIR}/FOO" CT_DoExecLog DEBUG rm -f "${CT_PREFIX_DIR}/foo" -# Kludge: CT_PREFIX_DIR might have grown read-only if -# the previous build was successful. -CT_DoExecLog ALL chmod -R u+w "${CT_PREFIX_DIR}" - # Setting up the rest of the environment only if not restarting if [ -z "${CT_RESTART}" ]; then - # Having .. inside CT_PREFIX breaks relocatability. - CT_SanitizeVarDir CT_PREFIX_DIR - case "${CT_SYSROOT_NAME}" in "") CT_SYSROOT_NAME="sysroot";; .) CT_Abort "Sysroot name is set to '.' which is forbidden";; |