Fix copypasta in gcc_version

Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
Bence Szépkúti 2024-07-12 14:00:29 +01:00
parent 864ecda59e
commit e4a42f536d

View File

@ -267,11 +267,11 @@ clang_version() {
}
gcc_version() {
cc="$1"
if command -v clang > /dev/null ; then
"$cc" --version | sed -En '1s/^[^ ]* \([^)]*\) ([0-9]+).*/\1/p'
gcc="$1"
if command -v "$gcc" > /dev/null ; then
"$gcc" --version | sed -En '1s/^[^ ]* \([^)]*\) ([0-9]+).*/\1/p'
else
echo 0 # report version 0 for "no clang"
echo 0 # report version 0 for "no gcc"
fi
}