configure: prepare for hybrid support
The goal is to do hybrid builds in a single jam (instead of calling a sub-jam to build parts with the secondary tool chain). This changeset adds support to configure to prepare multiple tool chains. configure: * Merge option --build-cross-tools-gcc4 into --build-cross-tools. The option does now always require a packaging architecture parameter, i.e. x86_gcc2 for the legacy tool chain. * Multiple occurrences of the --build-cross-tools and --cross-tools-prefix options are allowed. The first one specifies the primary tool chain, the subsequent ones the secondary tool chains. * All architecture dependent jam variables are now suffixed with the name of the packaging architecture. The new HAIKU_PACKAGING_ARCHS contains the packaging architectures for the prepared tool chains. The first element is for the primary tool chain. * No longer generate a separate libgccObjects file. Just put the respective variable into BuildConfig as well. build_cross_tools[_gcc4]: * Replace the <haiku output dir> parameter by a <install dir> parameter. This allows to create different cross-tools directories. They are simply suffixed by the packaging architecture. Jamrules: * For the moment map the variables for the primary tool chain to the respective suffix-less variables, so that everything still works as before. The next step is to actually support the secondary tool chains in the jam build system. This will require quite a bit more butchering, though.
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Parameters <haiku sourcedir> <buildtools dir> <haiku output dir>
|
||||
# Parameters <haiku sourcedir> <buildtools dir> <install dir>
|
||||
# Influential environmental variable:
|
||||
# * haikuRequiredLegacyGCCVersion: The required version of the gcc. Will be
|
||||
# checked against the version in the buildtools directory.
|
||||
|
||||
# get and check the parameters
|
||||
if [ $# -lt 3 ]; then
|
||||
echo Usage: $0 '<haiku sourcedir> <buildtools dir> <haiku output dir>' >&2
|
||||
echo Usage: $0 '<haiku sourcedir> <buildtools dir> <install dir>' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
haikuSourceDir=$1
|
||||
buildToolsDir=$2/legacy
|
||||
haikuOutputDir=$3
|
||||
installDir=$3
|
||||
shift 3
|
||||
additionalMakeArgs=$*
|
||||
# Note: The gcc 2 build has trouble with -jN N > 1, hence we only use the
|
||||
@@ -62,7 +62,7 @@ fi
|
||||
|
||||
|
||||
# create the output dir
|
||||
mkdir -p $haikuOutputDir || exit 1
|
||||
mkdir -p $installDir || exit 1
|
||||
|
||||
|
||||
# get absolute paths
|
||||
@@ -76,13 +76,13 @@ cd $buildToolsDir
|
||||
buildToolsDir=`pwd`
|
||||
cd $currentDir
|
||||
|
||||
cd $haikuOutputDir
|
||||
haikuOutputDir=`pwd`
|
||||
cd $installDir
|
||||
installDir=`pwd`
|
||||
cd $currentDir
|
||||
|
||||
|
||||
# create the object and installation directories for the cross compilation tools
|
||||
installDir=$haikuOutputDir/cross-tools
|
||||
objDir=$haikuOutputDir/cross-tools-build
|
||||
objDir=${installDir}-build
|
||||
binutilsObjDir=$objDir/binutils
|
||||
gccObjDir=$objDir/gcc
|
||||
tmpIncludeDir=$objDir/sysincludes
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# parameters <machine> <haiku sourcedir> <buildtools dir> <haiku output dir>
|
||||
# parameters <machine> <haiku sourcedir> <buildtools dir> <isntall dir>
|
||||
|
||||
# get and check the parameters
|
||||
if [ $# -lt 4 ]; then
|
||||
echo Usage: $0 '<machine> <haiku sourcedir> <buildtools dir>' \
|
||||
'<haiku output dir>' >&2
|
||||
'<install dir>' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
haikuMachine=$1
|
||||
haikuSourceDir=$2
|
||||
buildToolsDir=$3
|
||||
haikuOutputDir=$4
|
||||
installDir=$4
|
||||
shift 4
|
||||
additionalMakeArgs=$*
|
||||
|
||||
@@ -68,7 +68,7 @@ fi
|
||||
|
||||
|
||||
# create the output dir
|
||||
mkdir -p $haikuOutputDir || exit 1
|
||||
mkdir -p $installDir || exit 1
|
||||
|
||||
|
||||
# get absolute paths
|
||||
@@ -82,8 +82,9 @@ cd $buildToolsDir
|
||||
buildToolsDir=$(pwd)
|
||||
cd $currentDir
|
||||
|
||||
cd $haikuOutputDir
|
||||
haikuOutputDir=$(pwd)
|
||||
cd $installDir
|
||||
installDir=$(pwd)
|
||||
cd $currentDir
|
||||
|
||||
binutilsSourceDir=$buildToolsDir/binutils
|
||||
gccSourceDir=$buildToolsDir/gcc
|
||||
@@ -104,8 +105,7 @@ fi
|
||||
find $binutilsSourceDir $gccSourceDir -name \*.info -print0 | xargs -0 touch
|
||||
|
||||
# create the object and installation directories for the cross compilation tools
|
||||
installDir=$haikuOutputDir/cross-tools
|
||||
objDir=$haikuOutputDir/cross-tools-build
|
||||
objDir=${installDir}-build
|
||||
binutilsObjDir=$objDir/binutils
|
||||
gccObjDir=$objDir/gcc
|
||||
stdcxxObjDir=$objDir/stdcxx
|
||||
|
||||
Reference in New Issue
Block a user