Skip to content

Commit

Permalink
harden against a dashed suffix to the gcc version number
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-frbg authored Jul 27, 2024
1 parent 886acfc commit 175008c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions c_check
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,9 @@ if [ "$compiler" = "GCC" ]; then
no_avx2=0
oldgcc=0
data=`$compiler_name -dumpversion`
case "$data" in *-*)
data="${data%-*}"
esac
case "$data" in *.*.*)
data="${data%.*}"
esac
Expand Down

0 comments on commit 175008c

Please sign in to comment.