* 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:
@@ -48,8 +48,8 @@ haikuOutputDir=$(pwd)
|
|||||||
|
|
||||||
|
|
||||||
# create the object and installation directories for the cross compilation tools
|
# create the object and installation directories for the cross compilation tools
|
||||||
installDir=$haikuOutputDir/cross-tools
|
installDir=$haikuOutputDir/cross-tools-legacy
|
||||||
objDir=$haikuOutputDir/cross-tools-build
|
objDir=$haikuOutputDir/cross-tools-legacyt-build
|
||||||
binutilsObjDir=$objDir/binutils
|
binutilsObjDir=$objDir/binutils
|
||||||
gccObjDir=$objDir/gcc
|
gccObjDir=$objDir/gcc
|
||||||
tmpIncludeDir=$objDir/sysincludes
|
tmpIncludeDir=$objDir/sysincludes
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# create the object and installation directories for the cross compilation tools
|
# create the object and installation directories for the cross compilation tools
|
||||||
installDir=$haikuOutputDir/cross-tools
|
installDir=$haikuOutputDir/cross-tools-gcc4
|
||||||
objDir=$haikuOutputDir/cross-tools-build
|
objDir=$haikuOutputDir/cross-tools-gcc4-build
|
||||||
binutilsObjDir=$objDir/binutils
|
binutilsObjDir=$objDir/binutils
|
||||||
gccObjDir=$objDir/gcc
|
gccObjDir=$objDir/gcc
|
||||||
tmpIncludeDir=$objDir/sysincludes
|
tmpIncludeDir=$objDir/sysincludes
|
||||||
|
|||||||
@@ -26,13 +26,25 @@ options:
|
|||||||
Assume cross compilation. <build tools dir>
|
Assume cross compilation. <build tools dir>
|
||||||
defines the location of the build tools sources.
|
defines the location of the build tools sources.
|
||||||
They will be compiled and placed in the output
|
They will be compiled and placed in the output
|
||||||
directory under "cross-tools". The HAIKU_* tools
|
directory under "cross-tools-legacy". The HAIKU_*
|
||||||
variables will be set accordingly.
|
tools variables will be set accordingly.
|
||||||
--build-cross-tools-gcc4 <arch> <build tools dir>
|
--build-cross-tools-gcc4 <arch> <build tools dir>
|
||||||
Like "--build-cross-tools" just that gcc 4 will
|
Like "--build-cross-tools" just that gcc 4 will
|
||||||
be used for cross-compilation. Note, that the
|
be used for cross-compilation and the cross-tools
|
||||||
resulting Haiku installation built with gcc 4
|
will be placed in the output directory under
|
||||||
will not be binary compatible with BeOS R5.
|
"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
|
<arch> specifies the target architecture, either
|
||||||
"x86" or "ppc".
|
"x86" or "ppc".
|
||||||
--target=TARGET Select build target platform. [default=${target}]
|
--target=TARGET Select build target platform. [default=${target}]
|
||||||
@@ -236,7 +248,10 @@ while [ $# -gt 0 ] ; do
|
|||||||
--bochs-debug) bochs_debug=1; shift 1;;
|
--bochs-debug) bochs_debug=1; shift 1;;
|
||||||
--target=*) target=`echo $1 | cut -d'=' -f2-`; shift 1;;
|
--target=*) target=`echo $1 | cut -d'=' -f2-`; shift 1;;
|
||||||
--cross-tools-prefix) assertparam "$1" $#; crossToolsPrefix=$2; shift 2;;
|
--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;
|
--build-cross-tools-gcc4) assertparams "$1" 2 $#; buildCrossTools=$3;
|
||||||
buildCrossToolsScript="${buildCrossToolsScript}_gcc4";
|
buildCrossToolsScript="${buildCrossToolsScript}_gcc4";
|
||||||
case "$2" in
|
case "$2" in
|
||||||
@@ -245,8 +260,19 @@ while [ $# -gt 0 ] ; do
|
|||||||
*) echo "Unsupported target architecture: $2"
|
*) echo "Unsupported target architecture: $2"
|
||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
buildCrossToolsMachine=$haikuGCCMachine
|
buildCrossToolsMachine=$haikuGCCMachine;
|
||||||
|
crossToolsFolder="cross-tools-gcc4";
|
||||||
shift 3;;
|
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;;
|
--help | -h) usage; exit 0;;
|
||||||
*) echo Invalid argument: \`$1\'; exit 1;;
|
*) echo Invalid argument: \`$1\'; exit 1;;
|
||||||
esac
|
esac
|
||||||
@@ -295,7 +321,11 @@ mkdir -p "$buildOutputDir" || exit 1
|
|||||||
if [ -n "$buildCrossTools" ]; then
|
if [ -n "$buildCrossTools" ]; then
|
||||||
"$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \
|
"$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \
|
||||||
"$buildCrossTools" "$outputDir" || exit 1
|
"$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
|
fi
|
||||||
|
|
||||||
# cross tools
|
# cross tools
|
||||||
|
|||||||
Reference in New Issue
Block a user