152a38012Sejakowatz#!/bin/sh 252a38012Sejakowatz# 3338b8dc3SIngo Weinhold# configure [ <options> ] 4614026d7Sshatty 5022fa244SIngo Weinhold# usage 6022fa244SIngo Weinhold# 7022fa244SIngo Weinhold# Prints usage. 8022fa244SIngo Weinhold# 9022fa244SIngo Weinholdusage() 10022fa244SIngo Weinhold{ 11022fa244SIngo Weinhold cat << EOF 12022fa244SIngo Weinhold 13022fa244SIngo WeinholdUsage: $0 <options> 14022fa244SIngo Weinholdoptions: 1560d8d8fcSIngo Weinhold --alternative-gcc-output-dir <dir> 1660d8d8fcSIngo Weinhold Build a Haiku installation that supports running 1760d8d8fcSIngo Weinhold executables built with a gcc version incompatible 1860d8d8fcSIngo Weinhold with the primary gcc (e.g. gcc 2 executables under 1960d8d8fcSIngo Weinhold a gcc 4 Haiku or vice versa). <dir> specifies the 2060d8d8fcSIngo Weinhold output directory of the other gcc. The directory 2160d8d8fcSIngo Weinhold must already be fully configured. 2260d8d8fcSIngo Weinhold Note, that a sub-jam will be executed when 2360d8d8fcSIngo Weinhold building Haiku. When using a jam that is not 2460d8d8fcSIngo Weinhold simply invoked by "jam", the JAM build variable 2560d8d8fcSIngo Weinhold needs to be set accordingly. 2660d8d8fcSIngo Weinhold To disable building the alternative libraries 2760d8d8fcSIngo Weinhold the variable HAIKU_ADD_ALTERNATIVE_GCC_LIBS can be 2860d8d8fcSIngo Weinhold unset in the UserBuildConfig file. 29338b8dc3SIngo Weinhold --build-cross-tools <build tools dir> 30338b8dc3SIngo Weinhold Assume cross compilation. <build tools dir> 31338b8dc3SIngo Weinhold defines the location of the build tools sources. 32338b8dc3SIngo Weinhold They will be compiled and placed in the output 33a5b60fa8SOliver Tappe directory under "cross-tools". The HAIKU_* tools 34a5b60fa8SOliver Tappe variables will be set accordingly. 3520ab75e6SIngo Weinhold --build-cross-tools-gcc4 <arch> <build tools dir> 3629ef597dSIngo Weinhold Like "--build-cross-tools" just that gcc 4 will 37a5b60fa8SOliver Tappe be used for cross-compilation. Note, that the 38a5b60fa8SOliver Tappe resulting Haiku installation built with gcc 4 39a5b60fa8SOliver Tappe will not be binary compatible with BeOS R5. 4020ab75e6SIngo Weinhold <arch> specifies the target architecture, either 4197901ec5SIngo Weinhold "x86", "x86_64", "ppc", "m68k", "arm" or "mipsel". 42eccc7665SIngo Weinhold --cross-tools-prefix <prefix> 43eccc7665SIngo Weinhold Assume cross compilation. <prefix> should be a 44eccc7665SIngo Weinhold path to the directory where the cross 45eccc7665SIngo Weinhold compilation tools are located, plus the platform 460da9c208SIngo Weinhold prefix, e.g. "/path/to/tools/i586-pc-haiku-". 47eccc7665SIngo Weinhold This overrides the HAIKU_* tool variables. 48a66c32ddSIngo Weinhold --distro-compatibility <level> 49a66c32ddSIngo Weinhold The distribution's level of compatibility with 50a66c32ddSIngo Weinhold the official Haiku distribution. The generated 51a66c32ddSIngo Weinhold files will contain the respective trademarks 52a66c32ddSIngo Weinhold accordingly. 53a66c32ddSIngo Weinhold official -- the official Haiku distribution. 54a66c32ddSIngo Weinhold compatible -- a Haiku Compatible (tm) distro. 55a66c32ddSIngo Weinhold default -- any other distro (default value). 5660d8d8fcSIngo Weinhold --enable-multiuser Enable experimental multiuser support. 57eccc7665SIngo Weinhold --help Prints out this help. 58eccc7665SIngo Weinhold --include-gpl-addons Include GPL licensed add-ons. 5967838392SAxel Dörfler --include-patented-code Enable code that is known to implemented patented 6067838392SAxel Dörfler ideas and techniques. If this option is not 6167838392SAxel Dörfler specified, the resulting distribution may still 6267838392SAxel Dörfler implement patented ideas and techniques. This 6367838392SAxel Dörfler option only disables code that is currently known 6467838392SAxel Dörfler to be problematic. 6576fa0be3SIngo Weinhold --include-sources Includes the source code of projects that require 6676fa0be3SIngo Weinhold either an offer of source code or a copy of the 6776fa0be3SIngo Weinhold patched sources. This is preferable when 6876fa0be3SIngo Weinhold distributing on physical mediums. 691974210fSFrançois Revol --include-3rdparty Include 3rdparty/ in the build system. 7060d8d8fcSIngo Weinhold -j<n> Only relevant for --build-cross-tools and 7160d8d8fcSIngo Weinhold --build-cross-tools-gcc4. Is passed on to the 7260d8d8fcSIngo Weinhold make building the build tools. 737c4641d0SOliver Tappe --target=TARGET Select build target platform. 747c4641d0SOliver Tappe [default=${TARGET_PLATFORM}] 75a17b9c0cSshatty valid targets=r5,bone,dano,haiku 767c4641d0SOliver Tappe --update re-runs last configure invocation [must be given 777c4641d0SOliver Tappe as first option!] 78eccc7665SIngo Weinhold --use-gcc-pipe Build with GCC option -pipe. Speeds up the build 795a34a443SFrançois Revol process, but uses more memory. 80*ed38d2efSJerome Duval --use-gcc-graphite Build with GCC Graphite engine for loop 81*ed38d2efSJerome Duval optimizations. Only for gcc 4. 820385b065SIngo Weinhold --use-32bit Use -m32 flag on 64bit host gcc compiler. 834f4e5272SIngo Weinhold --use-xattr Use Linux xattr support for BeOS attribute 844f4e5272SIngo Weinhold emulation. Warning: Make sure your file system 854f4e5272SIngo Weinhold supports sufficient attribute sizes (4 KB per 864f4e5272SIngo Weinhold file for all attributes won't suffice). 87338b8dc3SIngo Weinhold 88338b8dc3SIngo Weinholdenvironment variables: 89338b8dc3SIngo Weinhold HAIKU_AR The static library archiver. Defaults to "ar". 90338b8dc3SIngo Weinhold HAIKU_CC The compiler. Defaults to "gcc". 91338b8dc3SIngo Weinhold HAIKU_LD The linker. Defaults to "ld". 92338b8dc3SIngo Weinhold HAIKU_OBJCOPY The objcopy to be used. Defaults to "objcopy". 93338b8dc3SIngo Weinhold HAIKU_RANLIB The static library indexer. Defaults to "ranlib". 9477e84f21SIngo Weinhold HAIKU_YASM The yasm assembler (x86 only). 9535f39081SMatt Madia HAIKU_STRIP The strip command. Defaults to "strip". 96338b8dc3SIngo Weinhold HAIKU_CPPFLAGS The preprocessor flags. Defaults to "". 97338b8dc3SIngo Weinhold HAIKU_CCFLAGS The C flags. Defaults to "". 98338b8dc3SIngo Weinhold HAIKU_CXXFLAGS The C++ flags. Defaults to "". 99338b8dc3SIngo Weinhold HAIKU_LDFLAGS The linker flags. Defaults to "". 100338b8dc3SIngo Weinhold HAIKU_ARFLAGS The flags passed to HAIKU_AR for archiving. 10123eb9a9eSFrançois Revol Defaults to "cru". 102338b8dc3SIngo Weinhold HAIKU_UNARFLAGS The flags passed to HAIKU_AR for unarchiving. 103338b8dc3SIngo Weinhold Defaults to "x". 10464f6da31SIngo Weinhold 10564f6da31SIngo WeinholdNon-standard output directories: 10664f6da31SIngo Weinhold By default all objects, build configuration, and other related files are 10764f6da31SIngo Weinhold stored in /path/to/haiku_source/generated. To store objects in a non-default 10864f6da31SIngo Weinhold location, run "../../relative/path/to/haiku_source/configure <options>" from 10964f6da31SIngo Weinhold within your non-default location. "jam [ options ] targets" can then be run 11064f6da31SIngo Weinhold directly inside your non-default location. Another option is to invoke "jam 11164f6da31SIngo Weinhold [ options ] targets" from within haiku_source. This can be accomplished by 11264f6da31SIngo Weinhold either "export HAIKU_OUTPUT_DIR=your non-default location" before invoking 11364f6da31SIngo Weinhold jam or by creating a symlink of haiku_source/generated pointing to your 11464f6da31SIngo Weinhold non-default location and running jam. 11564f6da31SIngo Weinhold 11664f6da31SIngo Weinhold 117022fa244SIngo WeinholdEOF 118022fa244SIngo Weinhold} 119022fa244SIngo Weinhold 120022fa244SIngo Weinhold# assertparam 121022fa244SIngo Weinhold# 122022fa244SIngo Weinhold# Checks whether at least one parameter is left. 123022fa244SIngo Weinhold# 124022fa244SIngo Weinholdassertparam() 125022fa244SIngo Weinhold{ 12620ab75e6SIngo Weinhold if [ $2 -lt 2 ]; then 127022fa244SIngo Weinhold echo $0: \`$1\': Parameter expected. 128022fa244SIngo Weinhold exit 1 129022fa244SIngo Weinhold fi 130022fa244SIngo Weinhold} 131022fa244SIngo Weinhold 13220ab75e6SIngo Weinhold# assertparams 13320ab75e6SIngo Weinhold# 13420ab75e6SIngo Weinhold# Checks whether at least a certain number of parameters is left. 13520ab75e6SIngo Weinhold# 13620ab75e6SIngo Weinholdassertparams() 13720ab75e6SIngo Weinhold{ 13820ab75e6SIngo Weinhold if [ $3 -le $2 ]; then 13920ab75e6SIngo Weinhold echo $0: \`$1\': Not enough parameters. 14020ab75e6SIngo Weinhold exit 1 14120ab75e6SIngo Weinhold fi 14220ab75e6SIngo Weinhold} 14320ab75e6SIngo Weinhold 1449a001156SOliver Tappe# real_path 1459a001156SOliver Tappe# 1469a001156SOliver Tappe# returns the realpath of a symbolic link. 1479a001156SOliver Tappe# 1489a001156SOliver Tappereal_path() 1499a001156SOliver Tappe{ 1509a001156SOliver Tappe perl -MCwd=realpath -e'print realpath($ARGV[0]), "\n"' "$1" 1519a001156SOliver Tappe} 1529a001156SOliver Tappe 15309c5682dSIngo Weinhold# standard_gcc_settings 15409c5682dSIngo Weinhold# 15509c5682dSIngo Weinhold# Sets the variables for a GCC platform. 15609c5682dSIngo Weinhold# 15709c5682dSIngo Weinholdstandard_gcc_settings() 15809c5682dSIngo Weinhold{ 159138f5fb4SIngo Weinhold if which greadlink > /dev/null 2>&1; then 160b29b48b1SMatt Madia readlink="greadlink -e" 161138f5fb4SIngo Weinhold elif which realpath > /dev/null 2>&1; then 162b29b48b1SMatt Madia readlink=realpath 1639a001156SOliver Tappe elif readlink -e / > /dev/null 2>&1; then 164b29b48b1SMatt Madia readlink="readlink -e" 1659a001156SOliver Tappe else 1669a001156SOliver Tappe readlink=real_path 167b4b6d83cSMatt Madia fi 168138f5fb4SIngo Weinhold 16909c5682dSIngo Weinhold # PLATFORM_LINKLIBS 170338b8dc3SIngo Weinhold gcclib=`$HAIKU_CC -print-libgcc-file-name` 17109c5682dSIngo Weinhold gccdir=`dirname ${gcclib}` 1725b0f7b1bSOliver Tappe 1737c4641d0SOliver Tappe HAIKU_GCC_RAW_VERSION=`$HAIKU_CC -dumpversion` 1747c4641d0SOliver Tappe HAIKU_GCC_MACHINE=`$HAIKU_CC -dumpmachine` 175748c10f2SJerome Duval if [ "$HAIKU_USE_GCC_GRAPHITE" != 0 ]; then 176748c10f2SJerome Duval UNUSED=`echo "int main() {}" | $HAIKU_CC -xc -c -floop-block - 2>&1` 177748c10f2SJerome Duval if [ $? != 0 ]; then 178748c10f2SJerome Duval echo "GCC Graphite loop optimizations cannot be used" 179748c10f2SJerome Duval HAIKU_USE_GCC_GRAPHITE=0 180748c10f2SJerome Duval fi 181748c10f2SJerome Duval fi 182338b8dc3SIngo Weinhold 183338b8dc3SIngo Weinhold HAIKU_GCC_LIB_DIR=${gccdir} 184338b8dc3SIngo Weinhold HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a 185338b8dc3SIngo Weinhold HAIKU_GCC_GLUE_CODE="crtbegin.o crtend.o" 18628b5bc75SMichael Lotz HAIKU_GCC_HEADERS_DIR="${gccdir}/include 18728b5bc75SMichael Lotz ${gccdir}/include-fixed" 1885d978968SIngo Weinhold HAIKU_GCC_LIBGCC_OBJECTS=`$HAIKU_AR t ${HAIKU_GCC_LIBGCC} | grep -v eabi.o` 1895d978968SIngo Weinhold # Note: We filter out eabi.o. It's present in gcc's libgcc for PPC and 1905d978968SIngo Weinhold # neither needed nor wanted. 1918b5934c9SIngo Weinhold 1927c4641d0SOliver Tappe case $HAIKU_GCC_RAW_VERSION in 1938b5934c9SIngo Weinhold 4.*) 1945b0f7b1bSOliver Tappe # for gcc 4 we use the libstdc++ and libsupc++ that come with the 1955b0f7b1bSOliver Tappe # compiler 1967c4641d0SOliver Tappe HAIKU_STATIC_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.a` 1977c4641d0SOliver Tappe HAIKU_SHARED_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.so` 1987c4641d0SOliver Tappe HAIKU_STATIC_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.a` 1997c4641d0SOliver Tappe HAIKU_SHARED_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.so` 20014210488SMichael Lotz 201aaeadfcbSAlex Smith # If the architecture has separate runtime libraries for the 202aaeadfcbSAlex Smith # kernel, use them. 203aaeadfcbSAlex Smith HAIKU_KERNEL_LIBGCC=`$HAIKU_CC -print-file-name=libgcc-kernel.a` 204aaeadfcbSAlex Smith if [ $HAIKU_KERNEL_LIBGCC = libgcc-kernel.a ]; then 205aaeadfcbSAlex Smith HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC 206aaeadfcbSAlex Smith fi 207aaeadfcbSAlex Smith HAIKU_KERNEL_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++-kernel.a` 208aaeadfcbSAlex Smith if [ $HAIKU_KERNEL_LIBSUPCXX = libsupc++-kernel.a ]; then 209aaeadfcbSAlex Smith HAIKU_KERNEL_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX 210aaeadfcbSAlex Smith fi 211aaeadfcbSAlex Smith 21214210488SMichael Lotz local headers 2137c4641d0SOliver Tappe if [ -d $gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION ]; then 2147c4641d0SOliver Tappe headers=$gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION 21514210488SMichael Lotz else 2167c4641d0SOliver Tappe headers=$gccdir/../../../../include/c++/$HAIKU_GCC_RAW_VERSION 21714210488SMichael Lotz fi 21814210488SMichael Lotz 2197c4641d0SOliver Tappe HAIKU_CXX_HEADERS_DIR=$headers 2207c4641d0SOliver Tappe for d in $HAIKU_GCC_MACHINE backward ext; do 22129ef597dSIngo Weinhold # Note: We need the line break, otherwise the line might become 22229ef597dSIngo Weinhold # too long for jam (512 bytes max). 2237c4641d0SOliver Tappe HAIKU_CXX_HEADERS_DIR="$HAIKU_CXX_HEADERS_DIR 22429ef597dSIngo Weinhold $headers/$d" 2258b5934c9SIngo Weinhold done 226274b450aSMarcus Overhagen 2273f9f9f9aSIngo Weinhold # Unset the HAIKU_{SHARED,STATIC}_LIB{STD,SUP}CXX variables, if the 2283f9f9f9aSIngo Weinhold # compiler didn't give us actual file names. Otherwise resolve 2293f9f9f9aSIngo Weinhold # symlinks to avoid problems when copying the libraries to the 2303f9f9f9aSIngo Weinhold # image. 2318b5934c9SIngo Weinhold 2327c4641d0SOliver Tappe if [ $HAIKU_STATIC_LIBSTDCXX = libstdc++.a ]; then 2337c4641d0SOliver Tappe HAIKU_STATIC_LIBSTDCXX= 2343f9f9f9aSIngo Weinhold else 235b29b48b1SMatt Madia HAIKU_STATIC_LIBSTDCXX=`$readlink $HAIKU_STATIC_LIBSTDCXX` 2368b5934c9SIngo Weinhold fi 2373f9f9f9aSIngo Weinhold 238ffe8b20cSIngo Weinhold if [ $HAIKU_SHARED_LIBSTDCXX = libstdc++.so ]; then 239ffe8b20cSIngo Weinhold HAIKU_SHARED_LIBSTDCXX= 2403f9f9f9aSIngo Weinhold else 241b29b48b1SMatt Madia HAIKU_SHARED_LIBSTDCXX=`$readlink $HAIKU_SHARED_LIBSTDCXX` 242ffe8b20cSIngo Weinhold fi 2433f9f9f9aSIngo Weinhold 2447c4641d0SOliver Tappe if [ $HAIKU_STATIC_LIBSUPCXX = libsupc++.a ]; then 2457c4641d0SOliver Tappe HAIKU_STATIC_LIBSUPCXX= 2463f9f9f9aSIngo Weinhold else 247b29b48b1SMatt Madia HAIKU_STATIC_LIBSUPCXX=`$readlink $HAIKU_STATIC_LIBSUPCXX` 248c89fc875SIngo Weinhold fi 2493f9f9f9aSIngo Weinhold 250ffe8b20cSIngo Weinhold if [ $HAIKU_SHARED_LIBSUPCXX = libsupc++.so ]; then 251ffe8b20cSIngo Weinhold HAIKU_SHARED_LIBSUPCXX= 2523f9f9f9aSIngo Weinhold else 253b29b48b1SMatt Madia HAIKU_SHARED_LIBSUPCXX=`$readlink $HAIKU_SHARED_LIBSUPCXX` 254ffe8b20cSIngo Weinhold fi 2558b5934c9SIngo Weinhold ;; 2566cc8eecfSOliver Tappe 2.9*) 2575b0f7b1bSOliver Tappe # check for correct (most up-to-date) legacy compiler and complain 2585b0f7b1bSOliver Tappe # if an older one is installed 2597c4641d0SOliver Tappe if [ $HAIKU_GCC_RAW_VERSION != $haikuRequiredLegacyGCCVersion ]; then 2605b0f7b1bSOliver Tappe echo "GCC version $haikuRequiredLegacyGCCVersion is required!"; 2615b0f7b1bSOliver Tappe echo "Please download it from www.haiku-os.org..."; 2625b0f7b1bSOliver Tappe exit 1; 2635b0f7b1bSOliver Tappe fi 264aaeadfcbSAlex Smith 265aaeadfcbSAlex Smith HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC 266aaeadfcbSAlex Smith HAIKU_KERNEL_LIBSUPCXX= 2675b0f7b1bSOliver Tappe ;; 2688b5934c9SIngo Weinhold esac 26965ad1ba3SAlex Smith 2704591ebc9SAlex Smith case $HAIKU_GCC_MACHINE in 2714591ebc9SAlex Smith x86_64-*) 272c864ba1aSAlex Smith # Boot loader is 32-bit, need the 32-bit libs. 27365ad1ba3SAlex Smith HAIKU_BOOT_LIBGCC=`$HAIKU_CC -m32 -print-libgcc-file-name` 27465ad1ba3SAlex Smith HAIKU_BOOT_LIBSUPCXX=`$HAIKU_CC -m32 -print-file-name=libsupc++.a` 2754591ebc9SAlex Smith ;; 2764591ebc9SAlex Smith *) 27765ad1ba3SAlex Smith HAIKU_BOOT_LIBGCC=$HAIKU_GCC_LIBGCC 27865ad1ba3SAlex Smith HAIKU_BOOT_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX 2794591ebc9SAlex Smith ;; 2804591ebc9SAlex Smith esac 28109c5682dSIngo Weinhold} 28209c5682dSIngo Weinhold 283338b8dc3SIngo Weinhold# set_default_value 284338b8dc3SIngo Weinhold# 285338b8dc3SIngo Weinhold# Set the value for a variable, if no value is set yet. 286338b8dc3SIngo Weinhold# 287338b8dc3SIngo Weinholdset_default_value() 288338b8dc3SIngo Weinhold{ 2890838a930SJérôme Duval eval "$1=\${$1-$2}" 290338b8dc3SIngo Weinhold} 291338b8dc3SIngo Weinhold 292338b8dc3SIngo Weinhold# get_build_tool_path 293338b8dc3SIngo Weinhold# 294338b8dc3SIngo Weinhold# Gets a usable absolute path of a build tool. 295338b8dc3SIngo Weinhold# 296338b8dc3SIngo Weinholdget_build_tool_path() 297338b8dc3SIngo Weinhold{ 298338b8dc3SIngo Weinhold local var="HAIKU_$1" 299338b8dc3SIngo Weinhold local tool=$2 300338b8dc3SIngo Weinhold local path="${crossToolsPrefix}$tool" 301338b8dc3SIngo Weinhold 302338b8dc3SIngo Weinhold if [ -f "$path" ]; then 303338b8dc3SIngo Weinhold # get absolute path 304a559f87aSFrançois Revol local oldPwd="`pwd`" 305a559f87aSFrançois Revol cd "`dirname "$path"`" 306a559f87aSFrançois Revol path="`pwd`/`basename "$path"`" 307338b8dc3SIngo Weinhold cd $oldPwd 308338b8dc3SIngo Weinhold else 3097fe2e06cSMatt Madia which "$path" > /dev/null 2>&1 || { 310338b8dc3SIngo Weinhold echo "Build tool \"$path\" not found." >&2 311338b8dc3SIngo Weinhold exit 1 312338b8dc3SIngo Weinhold } 313338b8dc3SIngo Weinhold fi 314338b8dc3SIngo Weinhold 315338b8dc3SIngo Weinhold eval "$var=$path" 316338b8dc3SIngo Weinhold} 317338b8dc3SIngo Weinhold 318338b8dc3SIngo Weinhold# get cwd and the source directory 319338b8dc3SIngo WeinholdcurrentDir=`pwd` 3206e7c6fe5SIngo Weinholdcd `dirname "$0"` 321338b8dc3SIngo WeinholdsourceDir=`pwd` 3226e7c6fe5SIngo Weinholdcd "$currentDir" 323338b8dc3SIngo Weinhold 32455d267a4SFrançois Revol# backup the passed arguments 32555d267a4SFrançois RevolconfigureArgs="$@" 32655d267a4SFrançois Revol 3277c4641d0SOliver Tappe# internal default parameter values 328022fa244SIngo Weinhold# 32952a38012Sejakowatzplatform=`uname` 3305abd9a46SIngo WeinholdplatformMachine=`uname -m` 33177e84f21SIngo WeinholdtargetArch=x86 332338b8dc3SIngo WeinholdcrossToolsPrefix= 333338b8dc3SIngo WeinholdbuildCrossTools= 33429ef597dSIngo WeinholdbuildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools" 33520ab75e6SIngo WeinholdbuildCrossToolsMachine= 33660d8d8fcSIngo WeinholdbuildCrossToolsJobs= 3377c4641d0SOliver Tappe 3387c4641d0SOliver Tappe# exported (BuildSetup) default parameter values 3397c4641d0SOliver Tappe# 3407c4641d0SOliver TappeHAIKU_GCC_RAW_VERSION= 3417c4641d0SOliver TappeHAIKU_GCC_MACHINE=i586-pc-haiku 3427c4641d0SOliver TappeHAIKU_STATIC_LIBSTDCXX= 3437c4641d0SOliver TappeHAIKU_SHARED_LIBSTDCXX= 3447c4641d0SOliver TappeHAIKU_STATIC_LIBSUPCXX= 3457c4641d0SOliver TappeHAIKU_SHARED_LIBSUPCXX= 3467c4641d0SOliver TappeHAIKU_CXX_HEADERS_DIR= 3477c4641d0SOliver TappeHOST_GCC_RAW_VERSION=`gcc -dumpversion` 3487c4641d0SOliver TappeHOST_GCC_MACHINE=`gcc -dumpmachine` 3497c4641d0SOliver TappeHAIKU_INCLUDE_GPL_ADDONS=0 3507c4641d0SOliver TappeHAIKU_INCLUDE_PATENTED_CODE=0 35176fa0be3SIngo WeinholdHAIKU_INCLUDE_SOURCES=0 3527c4641d0SOliver TappeHAIKU_INCLUDE_3RDPARTY=0 3537c4641d0SOliver TappeHAIKU_ENABLE_MULTIUSER=0 3547c4641d0SOliver TappeHAIKU_DISTRO_COMPATIBILITY=default 3557c4641d0SOliver TappeTARGET_PLATFORM=haiku 3567c4641d0SOliver TappeHAIKU_USE_GCC_PIPE=0 357748c10f2SJerome DuvalHAIKU_USE_GCC_GRAPHITE=0 3587986925fSIngo WeinholdHAIKU_HOST_USE_32BIT=0 3597986925fSIngo WeinholdHAIKU_HOST_USE_XATTR=0 3607c4641d0SOliver TappeHAIKU_ALTERNATIVE_GCC_OUTPUT_DIR= 36151355c10SIngo WeinholdHAIKU_ADD_ALTERNATIVE_GCC_LIBS=0 3627c4641d0SOliver TappeHOST_GCC_LD=`gcc -print-prog-name=ld` 3637c4641d0SOliver TappeHOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy` 364c505b276SFrançois RevolSFDISK_BINARY=sfdisk 365c505b276SFrançois RevolHOST_SFDISK=$SFDISK_BINARY 366338b8dc3SIngo Weinhold 36754295d08SJoseph R. ProstkohaikuRequiredLegacyGCCVersion="2.95.3-haiku-121101" 368a559f87aSFrançois Revolexport haikuRequiredLegacyGCCVersion 369af4bf973SOliver Tappe # version of legacy gcc required to build haiku 370af4bf973SOliver Tappe 371338b8dc3SIngo Weinholdset_default_value HAIKU_AR ar 372338b8dc3SIngo Weinholdset_default_value HAIKU_CC gcc 373338b8dc3SIngo Weinholdset_default_value HAIKU_LD ld 374338b8dc3SIngo Weinholdset_default_value HAIKU_OBJCOPY objcopy 375338b8dc3SIngo Weinholdset_default_value HAIKU_RANLIB ranlib 376385d69fcSAlex Smithset_default_value HAIKU_ELFEDIT elfedit 37777e84f21SIngo Weinholdset_default_value HAIKU_YASM yasm 37835f39081SMatt Madiaset_default_value HAIKU_STRIP strip 379338b8dc3SIngo Weinholdset_default_value HAIKU_CPPFLAGS "" 380338b8dc3SIngo Weinholdset_default_value HAIKU_CCFLAGS "" 381338b8dc3SIngo Weinholdset_default_value HAIKU_CXXFLAGS "" 382338b8dc3SIngo Weinholdset_default_value HAIKU_LDFLAGS "" 38323eb9a9eSFrançois Revolset_default_value HAIKU_ARFLAGS cru 384338b8dc3SIngo Weinholdset_default_value HAIKU_UNARFLAGS x 38562339647SAxel Dörfler 3867c4641d0SOliver Tappe# determine output directory 3877c4641d0SOliver Tappeif [ "$currentDir" = "$sourceDir" ]; then 3887c4641d0SOliver Tappe outputDir=$currentDir/generated 3897c4641d0SOliver Tappeelse 3907c4641d0SOliver Tappe outputDir=$currentDir 3917c4641d0SOliver Tappefi 3927c4641d0SOliver TappebuildOutputDir="$outputDir/build" 3937c4641d0SOliver TappeHAIKU_BUILD_ATTRIBUTES_DIR="$outputDir/attributes" 3947c4641d0SOliver TappebuildConfigFile="$buildOutputDir/BuildConfig" 3957c4641d0SOliver Tappe 3967c4641d0SOliver Tappe# check for update request 3977c4641d0SOliver Tappeif [ "$1" = "--update" ]; then 3987c4641d0SOliver Tappe if ! [ -e "$buildConfigFile" ]; then 3997c4641d0SOliver Tappe echo $0 --update: \'$buildConfigFile\' not found - updating not possible. 4007c4641d0SOliver Tappe exit 1 4017c4641d0SOliver Tappe fi 4027c4641d0SOliver Tappe if ! type perl >/dev/null 2>&1; then 4037c4641d0SOliver Tappe echo $0 --update: \'perl\' not found - updating not possible. 4047c4641d0SOliver Tappe exit 1 4057c4641d0SOliver Tappe fi 4067c4641d0SOliver Tappe # convert BuildConfig from jam format to shell format and evaluate it 4077c4641d0SOliver Tappe shellConfigFile="${buildConfigFile}.shell" 4087c4641d0SOliver Tappe perl "$sourceDir/build/scripts/convert_build_config_to_shell_format.pl" \ 4097c4641d0SOliver Tappe <"$buildConfigFile" >"$shellConfigFile" 4107c4641d0SOliver Tappe . "$shellConfigFile" 4117c4641d0SOliver Tappe rm "$shellConfigFile" 4127c4641d0SOliver Tappe shift 4137c4641d0SOliver Tappefi 4147c4641d0SOliver Tappe 415022fa244SIngo Weinhold# parse parameters 416022fa244SIngo Weinhold# 41720ab75e6SIngo Weinholdwhile [ $# -gt 0 ] ; do 418022fa244SIngo Weinhold case "$1" in 41960d8d8fcSIngo Weinhold --alternative-gcc-output-dir) 42060d8d8fcSIngo Weinhold assertparam "$1" $# 42160d8d8fcSIngo Weinhold cd $2 || exit 1 4227c4641d0SOliver Tappe HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR=`pwd` 4237c4641d0SOliver Tappe HAIKU_ADD_ALTERNATIVE_GCC_LIBS=1 42460d8d8fcSIngo Weinhold cd $currentDir 42560d8d8fcSIngo Weinhold shift 2 42660d8d8fcSIngo Weinhold ;; 427a5b60fa8SOliver Tappe --build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;; 4289b0dd528SIngo Weinhold --build-cross-tools-gcc4) 4299b0dd528SIngo Weinhold assertparams "$1" 2 $# 4309b0dd528SIngo Weinhold buildCrossTools=$3 4319b0dd528SIngo Weinhold buildCrossToolsScript="${buildCrossToolsScript}_gcc4" 43220ab75e6SIngo Weinhold case "$2" in 4337c4641d0SOliver Tappe x86) HAIKU_GCC_MACHINE=i586-pc-haiku;; 434b7777272SAlex Smith x86_64) HAIKU_GCC_MACHINE=x86_64-unknown-haiku; targetArch=x86_64;; 4357c4641d0SOliver Tappe ppc) HAIKU_GCC_MACHINE=powerpc-apple-haiku; targetArch=ppc;; 4365e4d3774SJohn Scipione m68k) HAIKU_GCC_MACHINE=m68k-unknown-haiku; targetArch=m68k;; 4377c4641d0SOliver Tappe arm) HAIKU_GCC_MACHINE=arm-unknown-haiku; targetArch=arm;; 4387c4641d0SOliver Tappe mipsel) HAIKU_GCC_MACHINE=mipsel-unknown-haiku; targetArch=mips;; 43920ab75e6SIngo Weinhold *) echo "Unsupported target architecture: $2" 44020ab75e6SIngo Weinhold exit 1;; 44120ab75e6SIngo Weinhold esac 4427c4641d0SOliver Tappe buildCrossToolsMachine=$HAIKU_GCC_MACHINE 4439b0dd528SIngo Weinhold shift 3 4449b0dd528SIngo Weinhold ;; 4459b0dd528SIngo Weinhold --cross-tools-prefix) 4469b0dd528SIngo Weinhold assertparam "$1" $# 4479b0dd528SIngo Weinhold crossToolsPrefix=$2 4489b0dd528SIngo Weinhold shift 2 4499b0dd528SIngo Weinhold ;; 450a66c32ddSIngo Weinhold --distro-compatibility) 4519b0dd528SIngo Weinhold assertparam "$1" $# 4527c4641d0SOliver Tappe HAIKU_DISTRO_COMPATIBILITY=$2 4537c4641d0SOliver Tappe case "$HAIKU_DISTRO_COMPATIBILITY" in 454a66c32ddSIngo Weinhold official) ;; 455a66c32ddSIngo Weinhold compatible) ;; 456a66c32ddSIngo Weinhold default) ;; 457a66c32ddSIngo Weinhold *) echo "Invalid distro compatibility" \ 4587c4641d0SOliver Tappe "level: $HAIKU_DISTRO_COMPATIBILITY" 459a66c32ddSIngo Weinhold exit 1;; 460a66c32ddSIngo Weinhold esac 4619b0dd528SIngo Weinhold shift 2 4629b0dd528SIngo Weinhold ;; 4637c4641d0SOliver Tappe --enable-multiuser) HAIKU_ENABLE_MULTIUSER=1; shift 1;; 46460d8d8fcSIngo Weinhold --help | -h) usage; exit 0;; 4657c4641d0SOliver Tappe --include-gpl-addons) HAIKU_INCLUDE_GPL_ADDONS=1; shift 1;; 4667c4641d0SOliver Tappe --include-patented-code) HAIKU_INCLUDE_PATENTED_CODE=1; shift 1;; 46776fa0be3SIngo Weinhold --include-sources) HAIKU_INCLUDE_SOURCES=1; shift 1;; 4687c4641d0SOliver Tappe --include-3rdparty) HAIKU_INCLUDE_3RDPARTY=1; shift 1;; 46960d8d8fcSIngo Weinhold -j*) buildCrossToolsJobs="$1"; shift 1;; 4707c4641d0SOliver Tappe --target=*) TARGET_PLATFORM=`echo $1 | cut -d'=' -f2-`; shift 1;; 4717c4641d0SOliver Tappe --use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;; 472748c10f2SJerome Duval --use-gcc-graphite) HAIKU_USE_GCC_GRAPHITE=1; shift 1;; 4737986925fSIngo Weinhold --use-32bit) HAIKU_HOST_USE_32BIT=1; shift 1;; 4747986925fSIngo Weinhold --use-xattr) HAIKU_HOST_USE_XATTR=1; shift 1;; 475022fa244SIngo Weinhold *) echo Invalid argument: \`$1\'; exit 1;; 476022fa244SIngo Weinhold esac 477022fa244SIngo Weinholddone 478022fa244SIngo Weinhold 4790df3cc9cSIngo Weinhold# detect the build platform 480338b8dc3SIngo Weinholdcase "${platform}" in 4810df3cc9cSIngo Weinhold BeOS) revision=`uname -r` 4820df3cc9cSIngo Weinhold case "$revision" in 4837c4641d0SOliver Tappe 6.*) HOST_PLATFORM=dano ;; 4847c4641d0SOliver Tappe 5.1) HOST_PLATFORM=dano ;; 4857c4641d0SOliver Tappe 5.0.4) HOST_PLATFORM=bone ;; 4867c4641d0SOliver Tappe 5.0*) HOST_PLATFORM=r5 ;; 4870df3cc9cSIngo Weinhold *) echo Unknown BeOS version: $revision 4880df3cc9cSIngo Weinhold exit 1 ;; 4890df3cc9cSIngo Weinhold esac 4900df3cc9cSIngo Weinhold ;; 4917c4641d0SOliver Tappe Darwin) HOST_PLATFORM=darwin ;; 4927c4641d0SOliver Tappe FreeBSD) HOST_PLATFORM=freebsd 493c505b276SFrançois Revol SFDISK_BINARY=sfdisk-linux 4947986925fSIngo Weinhold if [ "$HAIKU_HOST_USE_32BIT" = 1 ] ; then 4955abd9a46SIngo Weinhold echo Unsupported platform: FreeBSD ${platformMachine} 496308c212cSIngo Weinhold exit 1 497308c212cSIngo Weinhold fi ;; 4987c4641d0SOliver Tappe Haiku) HOST_PLATFORM=haiku_host ;; 4997c4641d0SOliver Tappe Linux) HOST_PLATFORM=linux ;; 5007c4641d0SOliver Tappe OpenBSD) HOST_PLATFORM=openbsd ;; 5017c4641d0SOliver Tappe SunOS) HOST_PLATFORM=sunos ;; 5027c4641d0SOliver Tappe CYGWIN_NT-*) HOST_PLATFORM=cygwin ;; 503338b8dc3SIngo Weinhold *) echo Unsupported platform: ${platform} 5044cbe4925SAxel Dörfler exit 1 ;; 5054cbe4925SAxel Dörfleresac 50652a38012Sejakowatz 507c505b276SFrançois Revol# check common locations for sfdisk 508c505b276SFrançois Revolfor sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do 509c505b276SFrançois Revol if [ -e ${sfdiskDir}/${SFDISK_BINARY} ]; then 510c505b276SFrançois Revol HOST_SFDISK=${sfdiskDir}/${SFDISK_BINARY} 511c505b276SFrançois Revol fi 512c505b276SFrançois Revoldone 513c505b276SFrançois Revol 5140962132cSAlex Smith# check for case-sensitive filesystem 5150962132cSAlex Smithmkdir haikuCaseTest 2>/dev/null 5160962132cSAlex Smithmkdir haikucasetest 2>/dev/null 5170962132cSAlex SmithcaseInsensitive=$? 51897f5a0bdSAlex Smithrmdir haikuCaseTest haikucasetest 2>/dev/null 5190962132cSAlex Smithif [ $caseInsensitive != 0 ]; then 5203ecc5287SMichael Lotz echo "You need a case-sensitive file-system to build Haiku." 5210962132cSAlex Smith if [ $HOST_PLATFORM = "darwin" ]; then 5220962132cSAlex Smith echo "You can create a case-sensitive disk image using Disk Utility and use" 5230962132cSAlex Smith echo "it to store the Haiku sources on." 5243ecc5287SMichael Lotz fi 5250962132cSAlex Smith exit 1 5263ecc5287SMichael Lotzfi 5273ecc5287SMichael Lotz 528338b8dc3SIngo Weinhold# create output directory 5296e7c6fe5SIngo Weinholdmkdir -p "$buildOutputDir" || exit 1 530338b8dc3SIngo Weinhold 531338b8dc3SIngo Weinhold# build cross tools from sources 532338b8dc3SIngo Weinholdif [ -n "$buildCrossTools" ]; then 53320ab75e6SIngo Weinhold "$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \ 53460d8d8fcSIngo Weinhold "$buildCrossTools" "$outputDir" $buildCrossToolsJobs || exit 1 5357c4641d0SOliver Tappe crossToolsPrefix="$outputDir/cross-tools/bin/${HAIKU_GCC_MACHINE}-" 536338b8dc3SIngo Weinholdfi 537338b8dc3SIngo Weinhold 538338b8dc3SIngo Weinhold# cross tools 539338b8dc3SIngo Weinholdif [ -n "$crossToolsPrefix" ]; then 540338b8dc3SIngo Weinhold get_build_tool_path AR ar 541338b8dc3SIngo Weinhold get_build_tool_path CC gcc 542338b8dc3SIngo Weinhold get_build_tool_path LD ld 543338b8dc3SIngo Weinhold get_build_tool_path OBJCOPY objcopy 544338b8dc3SIngo Weinhold get_build_tool_path RANLIB ranlib 54535f39081SMatt Madia get_build_tool_path STRIP strip 546b7777272SAlex Smithfi 547b7777272SAlex Smith 548b7777272SAlex Smith# prepare gcc settings 549b7777272SAlex Smithstandard_gcc_settings 550b7777272SAlex Smith 551b7777272SAlex Smith# cross tools for gcc4 builds 552b7777272SAlex Smithif [ -n "$crossToolsPrefix" ]; then 553bd16f0ddSAlex Smith case $HAIKU_GCC_RAW_VERSION in 554bd16f0ddSAlex Smith 4.*) 555385d69fcSAlex Smith get_build_tool_path ELFEDIT elfedit 556bd16f0ddSAlex Smith ;; 557bd16f0ddSAlex Smith esac 558338b8dc3SIngo Weinholdfi 559338b8dc3SIngo Weinhold 560eedc3d0bSIngo Weinhold# check whether the Haiku compiler really targets Haiku or BeOS 5617c4641d0SOliver Tappecase "$HAIKU_GCC_MACHINE" in 562eedc3d0bSIngo Weinhold *-*-haiku) ;; 563eedc3d0bSIngo Weinhold *-*-beos) ;; 564eedc3d0bSIngo Weinhold *) echo The compiler specified as Haiku target compiler is not a valid \ 565eedc3d0bSIngo Weinhold Haiku cross-compiler. Please see ReadMe.cross-compile. >&2 566eedc3d0bSIngo Weinhold echo compiler: $HAIKU_CC 5677c4641d0SOliver Tappe echo compiler is configured for target: $HAIKU_GCC_MACHINE 568eedc3d0bSIngo Weinhold exit 1 ;; 569eedc3d0bSIngo Weinholdesac 570eedc3d0bSIngo Weinhold 57152a38012Sejakowatz# Generate BuildConfig 5727c4641d0SOliver Tappecat << EOF > "$buildConfigFile" 57352a38012Sejakowatz# BuildConfig 574ab2540c4SIngo Weinhold# Note: This file has been automatically generated by configure with the 575ab2540c4SIngo Weinhold# following arguments: 57655d267a4SFrançois Revol# ${configureArgs} 57752a38012Sejakowatz 5787c4641d0SOliver TappeTARGET_PLATFORM ?= "${TARGET_PLATFORM}" ; 5797c4641d0SOliver TappeHOST_PLATFORM ?= "${HOST_PLATFORM}" ; 580338b8dc3SIngo Weinhold 5817c4641d0SOliver TappeHAIKU_INCLUDE_GPL_ADDONS ?= "${HAIKU_INCLUDE_GPL_ADDONS}" ; 5827c4641d0SOliver TappeHAIKU_INCLUDE_PATENTED_CODE ?= "${HAIKU_INCLUDE_PATENTED_CODE}" ; 58376fa0be3SIngo WeinholdHAIKU_INCLUDE_SOURCES ?= "${HAIKU_INCLUDE_SOURCES}" ; 5847c4641d0SOliver TappeHAIKU_INCLUDE_3RDPARTY ?= "${HAIKU_INCLUDE_3RDPARTY}" ; 5857c4641d0SOliver TappeHAIKU_ENABLE_MULTIUSER ?= "${HAIKU_ENABLE_MULTIUSER}" ; 5867c4641d0SOliver TappeHAIKU_DISTRO_COMPATIBILITY ?= "${HAIKU_DISTRO_COMPATIBILITY}" ; 5877c4641d0SOliver TappeHAIKU_USE_GCC_PIPE ?= "${HAIKU_USE_GCC_PIPE}" ; 588748c10f2SJerome DuvalHAIKU_USE_GCC_GRAPHITE ?= "${HAIKU_USE_GCC_GRAPHITE}" ; 5897986925fSIngo WeinholdHAIKU_HOST_USE_32BIT ?= "${HAIKU_HOST_USE_32BIT}" ; 5907986925fSIngo WeinholdHAIKU_HOST_USE_XATTR ?= "${HAIKU_HOST_USE_XATTR}" ; 5917c4641d0SOliver TappeHAIKU_ALTERNATIVE_GCC_OUTPUT_DIR ?= ${HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR} ; 5927c4641d0SOliver TappeHAIKU_ADD_ALTERNATIVE_GCC_LIBS ?= ${HAIKU_ADD_ALTERNATIVE_GCC_LIBS} ; 593eccc7665SIngo Weinhold 5947c4641d0SOliver TappeHAIKU_GCC_RAW_VERSION ?= ${HAIKU_GCC_RAW_VERSION} ; 5957c4641d0SOliver TappeHAIKU_GCC_MACHINE ?= ${HAIKU_GCC_MACHINE} ; 596338b8dc3SIngo WeinholdHAIKU_GCC_LIB_DIR ?= ${HAIKU_GCC_LIB_DIR} ; 597338b8dc3SIngo WeinholdHAIKU_GCC_HEADERS_DIR ?= ${HAIKU_GCC_HEADERS_DIR} ; 598338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC ?= ${HAIKU_GCC_LIBGCC} ; 599338b8dc3SIngo Weinhold 6007c4641d0SOliver TappeHAIKU_STATIC_LIBSTDC++ ?= ${HAIKU_STATIC_LIBSTDCXX} ; 6017c4641d0SOliver TappeHAIKU_SHARED_LIBSTDC++ ?= ${HAIKU_SHARED_LIBSTDCXX} ; 6027c4641d0SOliver TappeHAIKU_STATIC_LIBSUPC++ ?= ${HAIKU_STATIC_LIBSUPCXX} ; 6037c4641d0SOliver TappeHAIKU_SHARED_LIBSUPC++ ?= ${HAIKU_SHARED_LIBSUPCXX} ; 6047c4641d0SOliver TappeHAIKU_C++_HEADERS_DIR ?= ${HAIKU_CXX_HEADERS_DIR} ; 6058b5934c9SIngo Weinhold 606c864ba1aSAlex SmithHAIKU_KERNEL_LIBGCC ?= ${HAIKU_KERNEL_LIBGCC} ; 607c864ba1aSAlex SmithHAIKU_KERNEL_LIBSUPC++ ?= ${HAIKU_KERNEL_LIBSUPCXX} ; 60865ad1ba3SAlex SmithHAIKU_BOOT_LIBGCC ?= ${HAIKU_BOOT_LIBGCC} ; 60965ad1ba3SAlex SmithHAIKU_BOOT_LIBSUPC++ ?= ${HAIKU_BOOT_LIBSUPCXX} ; 61065ad1ba3SAlex Smith 6117c4641d0SOliver TappeHAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ; 612338b8dc3SIngo Weinhold 613338b8dc3SIngo WeinholdHAIKU_AR ?= ${HAIKU_AR} ; 614338b8dc3SIngo WeinholdHAIKU_CC ?= ${HAIKU_CC} ; 615338b8dc3SIngo WeinholdHAIKU_LD ?= ${HAIKU_LD} ; 616338b8dc3SIngo WeinholdHAIKU_OBJCOPY ?= ${HAIKU_OBJCOPY} ; 617338b8dc3SIngo WeinholdHAIKU_RANLIB ?= ${HAIKU_RANLIB} ; 618385d69fcSAlex SmithHAIKU_ELFEDIT ?= ${HAIKU_ELFEDIT} ; 61977e84f21SIngo WeinholdHAIKU_YASM ?= ${HAIKU_YASM} ; 62035f39081SMatt MadiaHAIKU_STRIP ?= ${HAIKU_STRIP} ; 621338b8dc3SIngo WeinholdHAIKU_CPPFLAGS ?= ${HAIKU_CPPFLAGS} ; 622338b8dc3SIngo WeinholdHAIKU_CCFLAGS ?= ${HAIKU_CCFLAGS} ; 6230d47dc5dSAlex SmithHAIKU_C++FLAGS ?= ${HAIKU_CXXFLAGS} ; 624338b8dc3SIngo WeinholdHAIKU_LDFLAGS ?= ${HAIKU_LDFLAGS} ; 625338b8dc3SIngo WeinholdHAIKU_ARFLAGS ?= ${HAIKU_ARFLAGS} ; 626338b8dc3SIngo WeinholdHAIKU_UNARFLAGS ?= ${HAIKU_UNARFLAGS} ; 627338b8dc3SIngo Weinhold 6287c4641d0SOliver TappeHOST_GCC_RAW_VERSION ?= ${HOST_GCC_RAW_VERSION} ; 6297c4641d0SOliver TappeHOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ; 6307c4641d0SOliver TappeHOST_LD ?= ${HOST_GCC_LD} ; 6317c4641d0SOliver TappeHOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ; 632c505b276SFrançois RevolHOST_SFDISK ?= ${HOST_SFDISK} ; 6338b5934c9SIngo Weinhold 634c4786ea6SlilloEOF 635c4786ea6Slillo 636b1e5b60cSAxel Dörfler# Libgcc.a objects 637b1e5b60cSAxel Dörfler 6386e7c6fe5SIngo Weinholdcat << EOF > "$buildOutputDir/libgccObjects" 639b1e5b60cSAxel Dörfler# libgcc.a objects to be linked against libroot.so 640b1e5b60cSAxel Dörfler# Note: This file has been automatically generated by configure. 641b1e5b60cSAxel Dörfler 642338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC_OBJECTS ?= ${HAIKU_GCC_LIBGCC_OBJECTS} ; 643b1e5b60cSAxel DörflerEOF 644b1e5b60cSAxel Dörfler 6459b0dd528SIngo Weinhold# Generate a boot strap Jamfile in the output directory. 646338b8dc3SIngo Weinhold 647338b8dc3SIngo Weinholdcat << EOF > $outputDir/Jamfile 648338b8dc3SIngo Weinhold# automatically generated Jamfile 649338b8dc3SIngo Weinhold 650338b8dc3SIngo WeinholdHAIKU_TOP = ${sourceDir} ; 651338b8dc3SIngo WeinholdHAIKU_OUTPUT_DIR = ${outputDir} ; 652338b8dc3SIngo Weinhold 653338b8dc3SIngo Weinholdinclude [ FDirName \$(HAIKU_TOP) Jamfile ] ; 654338b8dc3SIngo Weinhold 655338b8dc3SIngo WeinholdEOF 656