diff -r 20f2459b97bf -r ff6b7a9bd370 scripts/crosstool-NG.sh.in --- a/scripts/crosstool-NG.sh.in Mon Jan 28 21:53:18 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.