diff --git a/scripts/detect_cc.sh b/scripts/detect_cc.sh index cc08b5aa3..c9052f2e7 100755 --- a/scripts/detect_cc.sh +++ b/scripts/detect_cc.sh @@ -52,8 +52,8 @@ for i in "$@"; do esac done -CC_TYPE=$($CC -v 2>&1 | grep version | awk '{print $1}') -CXX_TYPE=$($CXX -v 2>&1 | grep version | awk '{print $1}') +CC_TYPE=$($CC -v 2>&1 | grep -w version | awk '{print $1}') +CXX_TYPE=$($CXX -v 2>&1 | grep -w version | awk '{print $1}') LD_TYPE=$(ld -v 2>&1 | awk '{print $2}') if [ "$CC_TYPE" != "$CXX_TYPE" ]; then