diff --git a/build/scripts/build_cross_tools b/build/scripts/build_cross_tools index 6347a2a33e..18f52a7dfe 100755 --- a/build/scripts/build_cross_tools +++ b/build/scripts/build_cross_tools @@ -113,8 +113,8 @@ cd $binutilsObjDir CFLAGS="-O2" CXXFLAGS="-O2" $buildToolsDir/binutils/configure \ --prefix=$installDir $buildHostSpec --target=i586-pc-haiku \ --disable-nls --enable-shared=yes --disable-werror || exit 1 -make $additionalMakeArgs || exit 1 -make $additionalMakeArgs install || exit 1 +$MAKE $additionalMakeArgs || exit 1 +$MAKE $additionalMakeArgs install || exit 1 PATH=$PATH:$installDir/bin export PATH @@ -173,13 +173,13 @@ eval "sed $sedExpr Makefile.bak > Makefile" || exit 1 rm Makefile.bak # make gcc -make cross || { +$MAKE cross || { echo "ERROR: Building gcc failed." >&2 exit 1 } # install gcc -make install-gcc-cross || { +$MAKE install-gcc-cross || { echo "ERROR: Installing the cross compiler failed." >&2 exit 1 } diff --git a/build/scripts/build_cross_tools_gcc4 b/build/scripts/build_cross_tools_gcc4 index 1b2e70c8f3..6004431e7c 100755 --- a/build/scripts/build_cross_tools_gcc4 +++ b/build/scripts/build_cross_tools_gcc4 @@ -16,16 +16,6 @@ installDir=$4 shift 4 additionalMakeArgs=$* -case `uname` in -FreeBSD|OpenBSD) - MAKE=gmake - ;; -*) - MAKE=make - ;; -esac -export MAKE - case $haikuMachine in x86_64-*) # GCC's default is to enable multilib, but there is a bug when diff --git a/configure b/configure index f46a3fe4d0..48d8df7677 100755 --- a/configure +++ b/configure @@ -754,6 +754,13 @@ else if [ -z "$isPrimaryArch" ]; then secondaryArch=$targetArch fi + + case $HOST_PLATFORM in + freebsd|openbsd) MAKE=gmake;; + *) MAKE=make;; + esac + + MAKE=$MAKE \ SECONDARY_ARCH=$secondaryArch \ HAIKU_USE_GCC_GRAPHITE=`get_variable \ HAIKU_USE_GCC_GRAPHITE_$targetArch` \