* implemented a suggestion of korli: the legacy & gcc4 cross-tools are now built

in separate folders ('cross-tools-legacy' and 'cross-tools-gcc4') and you
  can use the new cmdline-switches 'use-cross-tools' and 'use-cross-tools-gcc4'
  to switch between those two. Before, you always had to recompile the tools
  in order to switch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18985 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2006-10-01 18:52:48 +00:00
parent 2e965710dc
commit be2bd5ef4b
3 changed files with 42 additions and 12 deletions

View File

@ -48,8 +48,8 @@ haikuOutputDir=$(pwd)
# create the object and installation directories for the cross compilation tools
installDir=$haikuOutputDir/cross-tools
objDir=$haikuOutputDir/cross-tools-build
installDir=$haikuOutputDir/cross-tools-legacy
objDir=$haikuOutputDir/cross-tools-legacyt-build
binutilsObjDir=$objDir/binutils
gccObjDir=$objDir/gcc
tmpIncludeDir=$objDir/sysincludes

View File

@ -62,8 +62,8 @@ fi
# create the object and installation directories for the cross compilation tools
installDir=$haikuOutputDir/cross-tools
objDir=$haikuOutputDir/cross-tools-build
installDir=$haikuOutputDir/cross-tools-gcc4
objDir=$haikuOutputDir/cross-tools-gcc4-build
binutilsObjDir=$objDir/binutils
gccObjDir=$objDir/gcc
tmpIncludeDir=$objDir/sysincludes

46
configure vendored
View File

@ -26,13 +26,25 @@ options:
Assume cross compilation. <build tools dir>
defines the location of the build tools sources.
They will be compiled and placed in the output
directory under "cross-tools". The HAIKU_* tools
variables will be set accordingly.
directory under "cross-tools-legacy". The HAIKU_*
tools variables will be set accordingly.
--build-cross-tools-gcc4 <arch> <build tools dir>
Like "--build-cross-tools" just that gcc 4 will
be used for cross-compilation. Note, that the
resulting Haiku installation built with gcc 4
will not be binary compatible with BeOS R5.
be used for cross-compilation and the cross-tools
will be placed in the output directory under
"cross-tools-current". Note, that the resulting
Haiku installation built with gcc 4 will not be
binary compatible with BeOS R5.
<arch> specifies the target architecture, either
"x86" or "ppc".
--use-cross-tools
Selects the cross-tools from "cross-tools-legacy"
for compilation. The HAIKU_* tools variables will
be set accordingly.
--use-cross-tools-gcc4 <arch>
Selects the cross-tools from "cross-tools-gcc4"
for compilation. The HAIKU_* tools variables will
be set accordingly.
<arch> specifies the target architecture, either
"x86" or "ppc".
--target=TARGET Select build target platform. [default=${target}]
@ -236,7 +248,10 @@ while [ $# -gt 0 ] ; do
--bochs-debug) bochs_debug=1; shift 1;;
--target=*) target=`echo $1 | cut -d'=' -f2-`; shift 1;;
--cross-tools-prefix) assertparam "$1" $#; crossToolsPrefix=$2; shift 2;;
--build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;;
--build-cross-tools) assertparam "$1" $#; buildCrossTools=$2;
crossToolsFolder="cross-tools-legacy";
shift 2;;
--use-cross-tools) crossToolsFolder="cross-tools-legacy"; shift 1;;
--build-cross-tools-gcc4) assertparams "$1" 2 $#; buildCrossTools=$3;
buildCrossToolsScript="${buildCrossToolsScript}_gcc4";
case "$2" in
@ -245,8 +260,19 @@ while [ $# -gt 0 ] ; do
*) echo "Unsupported target architecture: $2"
exit 1;;
esac
buildCrossToolsMachine=$haikuGCCMachine
buildCrossToolsMachine=$haikuGCCMachine;
crossToolsFolder="cross-tools-gcc4";
shift 3;;
--use-cross-tools-gcc4) assertparam "$1" $#;
case "$2" in
x86) haikuGCCMachine=i586-pc-haiku;;
ppc) haikuGCCMachine=powerpc-apple-haiku;;
*) echo "Unsupported target architecture: $2"
exit 1;;
esac
buildCrossToolsMachine=$haikuGCCMachine;
crossToolsFolder="cross-tools-gcc4";
shift 2;;
--help | -h) usage; exit 0;;
*) echo Invalid argument: \`$1\'; exit 1;;
esac
@ -295,7 +321,11 @@ mkdir -p "$buildOutputDir" || exit 1
if [ -n "$buildCrossTools" ]; then
"$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \
"$buildCrossTools" "$outputDir" || exit 1
crossToolsPrefix="$outputDir/cross-tools/bin/${haikuGCCMachine}-"
fi
# use specified cross tools
if [ -n "$crossToolsFolder" ]; then
crossToolsPrefix="$outputDir/$crossToolsFolder/bin/${haikuGCCMachine}-"
fi
# cross tools