Skip to content

Commit 3effdc1

Browse files
authored
Protect CROSS_PATH against spurious addition of linebreaks from isolated dashes
fix for #3989
1 parent 654d87d commit 3effdc1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

c_check

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ if [ "`dirname \"$compiler_name\"`" != '.' ]; then
3535
cross_suffix="$cross_suffix`dirname \"$compiler_name\"`/"
3636
fi
3737

38-
bn=`basename $compiler_name`
38+
bn=`basename \"$compiler_name\"`
39+
3940
case "$bn" in
40-
*-*) cross_suffix="$cross_suffix${bn%-*}-"
41+
*-*) if [ "$bn" != '-']; then
42+
cross_suffix="$cross_suffix${bn%-*}-"
43+
fi
4144
esac
4245

4346
compiler=""

0 commit comments

Comments
 (0)