Protect CROSS_PATH against spurious addition of linebreaks from isolated dashes

fix for #3989
This commit is contained in:
Martin Kroeker 2023-04-07 19:32:22 +02:00 committed by GitHub
parent 654d87d73a
commit 3effdc1505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -35,9 +35,12 @@ if [ "`dirname \"$compiler_name\"`" != '.' ]; then
cross_suffix="$cross_suffix`dirname \"$compiler_name\"`/"
fi
bn=`basename $compiler_name`
bn=`basename \"$compiler_name\"`
case "$bn" in
*-*) cross_suffix="$cross_suffix${bn%-*}-"
*-*) if [ "$bn" != '-']; then
cross_suffix="$cross_suffix${bn%-*}-"
fi
esac
compiler=""