diff options
author | Yann E. MORIN" <yann.morin.1998@free.fr> | 2013-11-15 17:58:42 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@free.fr> | 2013-11-15 17:58:42 (GMT) |
commit | a5b6b0d129bc6672203a0dfb844a24495a207235 (patch) | |
tree | 4fe3ce85162fc75aba9cf6b63705dd5ad5477d69 /scripts/crosstool-NG.sh.in | |
parent | 24953be31a56186d4e3188aed7237ca2bb3c7525 (diff) |
scripts: remove duplicate '/' in prefix, it breaks relocation
Reported-by: Richard Weinberger <richard.weinberger@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r-- | scripts/crosstool-NG.sh.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index b6bfeb4..7126ee7 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -154,6 +154,9 @@ CT_DoBuildTargetTuple # Sanity check some directories CT_TestAndAbort "'CT_PREFIX_DIR' is not set: where should I install?" -z "${CT_PREFIX_DIR}" +# Avoid multiple '/' in the prefix dir, it breaks relocatability +CT_PREFIX_DIR="$( "${sed}" -r -e 's:/+:/:g; s:/*$::;' <<<"${CT_PREFIX_DIR}" )" + # Second kludge: merge user-supplied target CFLAGS with architecture-provided # target CFLAGS. Do the same for LDFLAGS in case it happens in the future. # Put user-supplied flags at the end, so that they take precedence. |