Skip to content

Commit 326b200

Browse files
authoredApr 7, 2023
Merge pull request #3996 from martin-frbg/issue3989
Protect CROSS_SUFFIX against spurious linebreaks from isolated dashes
2 parents 654d87d + 3effdc1 commit 326b200

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed
 

‎c_check

+5-2
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)
Please sign in to comment.