toolchains: Check for GNU make 4.x

GNU make 4.x is needed to cross-compile glibc 2.28 and newer.
This ensures the problem is caught earlier on CentOS release 7.6, whose
default make version remains 3.82.
This commit is contained in:
Albert Ou
2019-09-27 22:18:56 +00:00
parent a6b8301f0f
commit c7b252aa09
2 changed files with 8 additions and 1 deletions

View File

@@ -99,6 +99,13 @@ if [ "${EC2FASTINSTALL}" = true ] ; then
git submodule deinit "${module}" || :
else
"${MAKE}" --version | (
read -r makever
case ${makever} in
'GNU Make '[4-9]\.*|'GNU Make '[1-9][0-9]) ;;
*) false ;;
esac; ) || die 'obsolete make version; need GNU make 4.x or later'
module_prepare riscv-gnu-toolchain qemu
module_build riscv-gnu-toolchain --prefix="${RISCV}"
echo '==> Building GNU/Linux toolchain'

View File

@@ -14,7 +14,7 @@ case ${ncpu} in
*) export MAKEFLAGS="-j ${ncpu} ${MAKEFLAGS}" ;;
esac
MAKE=$(command -v gmake || command -v make)
MAKE=$(command -v gnumake || command -v gmake || command -v make)
readonly MAKE