build: replace which with command -v

PR-URL: https://github.com/nodejs/node/pull/36118
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
raisinten
2020-11-14 20:50:03 +05:30
committed by Antoine du Hamel
parent 3e0194e88e
commit 2d167f0dc7
5 changed files with 12 additions and 12 deletions

View File

@@ -50,8 +50,8 @@ esac
HOST_OS="linux"
HOST_ARCH="x86_64"
export CC_host=$(which gcc)
export CXX_host=$(which g++)
export CC_host=$(command -v gcc)
export CXX_host=$(command -v g++)
host_gcc_version=$($CC_host --version | grep gcc | awk '{print $NF}')
major=$(echo $host_gcc_version | awk -F . '{print $1}')