# HG changeset patch # User "Yann E. MORIN" # Date 1384538322 -3600 # Node ID ff6b7a9bd370b73067042b1989489343d7491706 # Parent 469e9b4f12648f0bb6337683c50ceccc85f53852 scripts: remove duplicate '/' in prefix, it breaks relocation Reported-by: Richard Weinberger Signed-off-by: "Yann E. MORIN" diff -r 469e9b4f1264 -r ff6b7a9bd370 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Fri Nov 08 15:24:20 2013 +0100 +++ b/scripts/crosstool-NG.sh.in Fri Nov 15 18:58:42 2013 +0100 @@ -154,6 +154,9 @@ # 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.