1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

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 915fa3e6c7
commit 26822ab1b6

View File

@@ -798,11 +798,11 @@ pre_check_tools () {
}
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
}