scripts: remove duplicate '/' in prefix, it breaks relocation
author"Yann E. MORIN" <yann.morin.1998@free.fr>
Fri Nov 15 18:58:42 2013 +0100 (2013-11-15)
changeset 3246ff6b7a9bd370
parent 3245 469e9b4f1264
child 3247 01ef2159b12a
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>
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Fri Nov 08 15:24:20 2013 +0100
     1.2 +++ b/scripts/crosstool-NG.sh.in	Fri Nov 15 18:58:42 2013 +0100
     1.3 @@ -154,6 +154,9 @@
     1.4  # Sanity check some directories
     1.5  CT_TestAndAbort "'CT_PREFIX_DIR' is not set: where should I install?" -z "${CT_PREFIX_DIR}"
     1.6  
     1.7 +# Avoid multiple '/' in the prefix dir, it breaks relocatability
     1.8 +CT_PREFIX_DIR="$( "${sed}" -r -e 's:/+:/:g; s:/*$::;' <<<"${CT_PREFIX_DIR}" )"
     1.9 +
    1.10  # Second kludge: merge user-supplied target CFLAGS with architecture-provided
    1.11  # target CFLAGS. Do the same for LDFLAGS in case it happens in the future.
    1.12  # Put user-supplied flags at the end, so that they take precedence.