Skip to content

Commit 175008c

Browse files
authored
harden against a dashed suffix to the gcc version number
1 parent 886acfc commit 175008c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

c_check

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ if [ "$compiler" = "GCC" ]; then
356356
no_avx2=0
357357
oldgcc=0
358358
data=`$compiler_name -dumpversion`
359+
case "$data" in *-*)
360+
data="${data%-*}"
361+
esac
359362
case "$data" in *.*.*)
360363
data="${data%.*}"
361364
esac

0 commit comments

Comments
 (0)