Fix build of gcc2 on BSD (with bsdmake)
* apparently, -j1 doesn't work as intended with bsdmake, so we drop any multiple-job specification from MAKEFLAGS, instead
This commit is contained in:
@@ -92,12 +92,18 @@ mkdir -p $installDir/lib/gcc-lib/i586-pc-haiku/$haikuRequiredLegacyGCCVersion
|
|||||||
# force the POSIX locale, as the build (makeinfo) might choke otherwise
|
# force the POSIX locale, as the build (makeinfo) might choke otherwise
|
||||||
export LC_ALL=POSIX
|
export LC_ALL=POSIX
|
||||||
|
|
||||||
|
# drop an multiple job arguments from MAKEFLAGS
|
||||||
|
if [ ! -z "$MAKEFLAGS" ]; then
|
||||||
|
export MAKEFLAGS=$(echo $MAKEFLAGS | sed -e 's/-j\s*[0-9][0-9]*//g')
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# build binutils
|
# build binutils
|
||||||
cd $binutilsObjDir
|
cd $binutilsObjDir
|
||||||
CFLAGS="-O2" CXXFLAGS="-O2" $buildToolsDir/binutils/configure \
|
CFLAGS="-O2" CXXFLAGS="-O2" $buildToolsDir/binutils/configure \
|
||||||
--prefix=$installDir --target=i586-pc-haiku --disable-nls \
|
--prefix=$installDir --target=i586-pc-haiku --disable-nls \
|
||||||
--enable-shared=yes --disable-werror || exit 1
|
--enable-shared=yes --disable-werror || exit 1
|
||||||
make -j1 $additionalMakeArgs || exit 1
|
make $additionalMakeArgs || exit 1
|
||||||
make $additionalMakeArgs install || exit 1
|
make $additionalMakeArgs install || exit 1
|
||||||
|
|
||||||
PATH=$PATH:$installDir/bin
|
PATH=$PATH:$installDir/bin
|
||||||
@@ -157,7 +163,7 @@ eval "sed $sedExpr Makefile.bak > Makefile" || exit 1
|
|||||||
rm Makefile.bak
|
rm Makefile.bak
|
||||||
|
|
||||||
# make gcc
|
# make gcc
|
||||||
make -j1 cross || {
|
make cross || {
|
||||||
echo "ERROR: Building gcc failed." >&2
|
echo "ERROR: Building gcc failed." >&2
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user