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: 15338b8dc3SIngo Weinhold --build-cross-tools <build tools dir> 16338b8dc3SIngo Weinhold Assume cross compilation. <build tools dir> 17338b8dc3SIngo Weinhold defines the location of the build tools sources. 18338b8dc3SIngo Weinhold They will be compiled and placed in the output 19a5b60fa8SOliver Tappe directory under "cross-tools". The HAIKU_* tools 20a5b60fa8SOliver Tappe variables will be set accordingly. 2120ab75e6SIngo Weinhold --build-cross-tools-gcc4 <arch> <build tools dir> 2229ef597dSIngo Weinhold Like "--build-cross-tools" just that gcc 4 will 23a5b60fa8SOliver Tappe be used for cross-compilation. Note, that the 24a5b60fa8SOliver Tappe resulting Haiku installation built with gcc 4 25a5b60fa8SOliver Tappe will not be binary compatible with BeOS R5. 2620ab75e6SIngo Weinhold <arch> specifies the target architecture, either 2797901ec5SIngo Weinhold "x86", "x86_64", "ppc", "m68k", "arm" or "mipsel". 28eccc7665SIngo Weinhold --cross-tools-prefix <prefix> 29eccc7665SIngo Weinhold Assume cross compilation. <prefix> should be a 30eccc7665SIngo Weinhold path to the directory where the cross 31eccc7665SIngo Weinhold compilation tools are located, plus the platform 320da9c208SIngo Weinhold prefix, e.g. "/path/to/tools/i586-pc-haiku-". 33eccc7665SIngo Weinhold This overrides the HAIKU_* tool variables. 34a66c32ddSIngo Weinhold --distro-compatibility <level> 35a66c32ddSIngo Weinhold The distribution's level of compatibility with 36a66c32ddSIngo Weinhold the official Haiku distribution. The generated 37a66c32ddSIngo Weinhold files will contain the respective trademarks 38a66c32ddSIngo Weinhold accordingly. 39a66c32ddSIngo Weinhold official -- the official Haiku distribution. 40a66c32ddSIngo Weinhold compatible -- a Haiku Compatible (tm) distro. 41a66c32ddSIngo Weinhold default -- any other distro (default value). 4260d8d8fcSIngo Weinhold --enable-multiuser Enable experimental multiuser support. 43eccc7665SIngo Weinhold --help Prints out this help. 442ebcd86dSIngo Weinhold --host-only Configure for building tools for the build host 452ebcd86dSIngo Weinhold only. Haiku cannot be built when configured like 462ebcd86dSIngo Weinhold this. 47eccc7665SIngo Weinhold --include-gpl-addons Include GPL licensed add-ons. 4867838392SAxel Dörfler --include-patented-code Enable code that is known to implemented patented 4967838392SAxel Dörfler ideas and techniques. If this option is not 5067838392SAxel Dörfler specified, the resulting distribution may still 5167838392SAxel Dörfler implement patented ideas and techniques. This 5267838392SAxel Dörfler option only disables code that is currently known 5367838392SAxel Dörfler to be problematic. 5476fa0be3SIngo Weinhold --include-sources Includes the source code of projects that require 5576fa0be3SIngo Weinhold either an offer of source code or a copy of the 5676fa0be3SIngo Weinhold patched sources. This is preferable when 5776fa0be3SIngo Weinhold distributing on physical mediums. 581974210fSFrançois Revol --include-3rdparty Include 3rdparty/ in the build system. 5960d8d8fcSIngo Weinhold -j<n> Only relevant for --build-cross-tools and 6060d8d8fcSIngo Weinhold --build-cross-tools-gcc4. Is passed on to the 6160d8d8fcSIngo Weinhold make building the build tools. 627c4641d0SOliver Tappe --target=TARGET Select build target platform. 637c4641d0SOliver Tappe [default=${TARGET_PLATFORM}] 64a17b9c0cSshatty valid targets=r5,bone,dano,haiku 657c4641d0SOliver Tappe --update re-runs last configure invocation [must be given 667c4641d0SOliver Tappe as first option!] 67eccc7665SIngo Weinhold --use-gcc-pipe Build with GCC option -pipe. Speeds up the build 685a34a443SFrançois Revol process, but uses more memory. 69ed38d2efSJerome Duval --use-gcc-graphite Build with GCC Graphite engine for loop 70ed38d2efSJerome Duval optimizations. Only for gcc 4. 710385b065SIngo Weinhold --use-32bit Use -m32 flag on 64bit host gcc compiler. 72bc96e8f3SIngo Weinhold --use-xattr Use Linux xattr respectively *BSD extattr support 73bc96e8f3SIngo Weinhold for BeOS attribute emulation. Warning: Make sure 74bc96e8f3SIngo Weinhold your file system supports sufficient attribute 75bc96e8f3SIngo Weinhold sizes (4 KB per file for all attributes won't 76bc96e8f3SIngo Weinhold suffice). 77bc96e8f3SIngo Weinhold --use-xattr-ref Use the generic BeOS attribute emulation, but use 78bc96e8f3SIngo Weinhold Linux xattr respectively *BSD extattr support to 79bc96e8f3SIngo Weinhold make it more robust (i.e. attribute mix-ups become 80bc96e8f3SIngo Weinhold less likely). 81338b8dc3SIngo Weinhold 82338b8dc3SIngo Weinholdenvironment variables: 83338b8dc3SIngo Weinhold HAIKU_AR The static library archiver. Defaults to "ar". 84338b8dc3SIngo Weinhold HAIKU_CC The compiler. Defaults to "gcc". 85338b8dc3SIngo Weinhold HAIKU_LD The linker. Defaults to "ld". 86338b8dc3SIngo Weinhold HAIKU_OBJCOPY The objcopy to be used. Defaults to "objcopy". 87338b8dc3SIngo Weinhold HAIKU_RANLIB The static library indexer. Defaults to "ranlib". 8877e84f21SIngo Weinhold HAIKU_YASM The yasm assembler (x86 only). 8935f39081SMatt Madia HAIKU_STRIP The strip command. Defaults to "strip". 90338b8dc3SIngo Weinhold HAIKU_CPPFLAGS The preprocessor flags. Defaults to "". 91338b8dc3SIngo Weinhold HAIKU_CCFLAGS The C flags. Defaults to "". 92338b8dc3SIngo Weinhold HAIKU_CXXFLAGS The C++ flags. Defaults to "". 93338b8dc3SIngo Weinhold HAIKU_LDFLAGS The linker flags. Defaults to "". 94338b8dc3SIngo Weinhold HAIKU_ARFLAGS The flags passed to HAIKU_AR for archiving. 9523eb9a9eSFrançois Revol Defaults to "cru". 96338b8dc3SIngo Weinhold HAIKU_UNARFLAGS The flags passed to HAIKU_AR for unarchiving. 97338b8dc3SIngo Weinhold Defaults to "x". 9864f6da31SIngo Weinhold 9964f6da31SIngo WeinholdNon-standard output directories: 10064f6da31SIngo Weinhold By default all objects, build configuration, and other related files are 10164f6da31SIngo Weinhold stored in /path/to/haiku_source/generated. To store objects in a non-default 10264f6da31SIngo Weinhold location, run "../../relative/path/to/haiku_source/configure <options>" from 10364f6da31SIngo Weinhold within your non-default location. "jam [ options ] targets" can then be run 10464f6da31SIngo Weinhold directly inside your non-default location. Another option is to invoke "jam 10564f6da31SIngo Weinhold [ options ] targets" from within haiku_source. This can be accomplished by 10664f6da31SIngo Weinhold either "export HAIKU_OUTPUT_DIR=your non-default location" before invoking 10764f6da31SIngo Weinhold jam or by creating a symlink of haiku_source/generated pointing to your 10864f6da31SIngo Weinhold non-default location and running jam. 10964f6da31SIngo Weinhold 11064f6da31SIngo Weinhold 111022fa244SIngo WeinholdEOF 112022fa244SIngo Weinhold} 113022fa244SIngo Weinhold 114022fa244SIngo Weinhold# assertparam 115022fa244SIngo Weinhold# 116022fa244SIngo Weinhold# Checks whether at least one parameter is left. 117022fa244SIngo Weinhold# 118022fa244SIngo Weinholdassertparam() 119022fa244SIngo Weinhold{ 12020ab75e6SIngo Weinhold if [ $2 -lt 2 ]; then 121022fa244SIngo Weinhold echo $0: \`$1\': Parameter expected. 122022fa244SIngo Weinhold exit 1 123022fa244SIngo Weinhold fi 124022fa244SIngo Weinhold} 125022fa244SIngo Weinhold 12620ab75e6SIngo Weinhold# assertparams 12720ab75e6SIngo Weinhold# 12820ab75e6SIngo Weinhold# Checks whether at least a certain number of parameters is left. 12920ab75e6SIngo Weinhold# 13020ab75e6SIngo Weinholdassertparams() 13120ab75e6SIngo Weinhold{ 13220ab75e6SIngo Weinhold if [ $3 -le $2 ]; then 13320ab75e6SIngo Weinhold echo $0: \`$1\': Not enough parameters. 13420ab75e6SIngo Weinhold exit 1 13520ab75e6SIngo Weinhold fi 13620ab75e6SIngo Weinhold} 13720ab75e6SIngo Weinhold 1389a001156SOliver Tappe# real_path 1399a001156SOliver Tappe# 1409a001156SOliver Tappe# returns the realpath of a symbolic link. 1419a001156SOliver Tappe# 1429a001156SOliver Tappereal_path() 1439a001156SOliver Tappe{ 1449a001156SOliver Tappe perl -MCwd=realpath -e'print realpath($ARGV[0]), "\n"' "$1" 1459a001156SOliver Tappe} 1469a001156SOliver Tappe 14709c5682dSIngo Weinhold# standard_gcc_settings 14809c5682dSIngo Weinhold# 14909c5682dSIngo Weinhold# Sets the variables for a GCC platform. 15009c5682dSIngo Weinhold# 15109c5682dSIngo Weinholdstandard_gcc_settings() 15209c5682dSIngo Weinhold{ 153138f5fb4SIngo Weinhold if which greadlink > /dev/null 2>&1; then 154b29b48b1SMatt Madia readlink="greadlink -e" 155138f5fb4SIngo Weinhold elif which realpath > /dev/null 2>&1; then 156b29b48b1SMatt Madia readlink=realpath 1579a001156SOliver Tappe elif readlink -e / > /dev/null 2>&1; then 158b29b48b1SMatt Madia readlink="readlink -e" 1599a001156SOliver Tappe else 1609a001156SOliver Tappe readlink=real_path 161b4b6d83cSMatt Madia fi 162138f5fb4SIngo Weinhold 16309c5682dSIngo Weinhold # PLATFORM_LINKLIBS 164338b8dc3SIngo Weinhold gcclib=`$HAIKU_CC -print-libgcc-file-name` 16509c5682dSIngo Weinhold gccdir=`dirname ${gcclib}` 1665b0f7b1bSOliver Tappe 1677c4641d0SOliver Tappe HAIKU_GCC_RAW_VERSION=`$HAIKU_CC -dumpversion` 1687c4641d0SOliver Tappe HAIKU_GCC_MACHINE=`$HAIKU_CC -dumpmachine` 169748c10f2SJerome Duval if [ "$HAIKU_USE_GCC_GRAPHITE" != 0 ]; then 170748c10f2SJerome Duval UNUSED=`echo "int main() {}" | $HAIKU_CC -xc -c -floop-block - 2>&1` 171748c10f2SJerome Duval if [ $? != 0 ]; then 172748c10f2SJerome Duval echo "GCC Graphite loop optimizations cannot be used" 173748c10f2SJerome Duval HAIKU_USE_GCC_GRAPHITE=0 174748c10f2SJerome Duval fi 175748c10f2SJerome Duval fi 176338b8dc3SIngo Weinhold 177338b8dc3SIngo Weinhold HAIKU_GCC_LIB_DIR=${gccdir} 178338b8dc3SIngo Weinhold HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a 179338b8dc3SIngo Weinhold HAIKU_GCC_GLUE_CODE="crtbegin.o crtend.o" 18028b5bc75SMichael Lotz HAIKU_GCC_HEADERS_DIR="${gccdir}/include 18128b5bc75SMichael Lotz ${gccdir}/include-fixed" 1825d978968SIngo Weinhold HAIKU_GCC_LIBGCC_OBJECTS=`$HAIKU_AR t ${HAIKU_GCC_LIBGCC} | grep -v eabi.o` 1835d978968SIngo Weinhold # Note: We filter out eabi.o. It's present in gcc's libgcc for PPC and 1845d978968SIngo Weinhold # neither needed nor wanted. 1858b5934c9SIngo Weinhold 186*fc8967f1SIngo Weinhold # determine architecture from machine triple 187*fc8967f1SIngo Weinhold case $HAIKU_GCC_MACHINE in 188*fc8967f1SIngo Weinhold arm-*) HAIKU_CPU=arm;; 189*fc8967f1SIngo Weinhold i?86-*) HAIKU_CPU=x86;; 190*fc8967f1SIngo Weinhold m68k-*) HAIKU_CPU=m68k;; 191*fc8967f1SIngo Weinhold mipsel-*) HAIKU_CPU=mipsel;; 192*fc8967f1SIngo Weinhold powerpc-*) HAIKU_CPU=ppc;; 193*fc8967f1SIngo Weinhold x86_64-*) HAIKU_CPU=x86_64;; 194*fc8967f1SIngo Weinhold *) 195*fc8967f1SIngo Weinhold echo "Unsupported gcc target machine: $HAIKU_GCC_MACHINE" >&2 196*fc8967f1SIngo Weinhold exit 1 197*fc8967f1SIngo Weinhold ;; 198*fc8967f1SIngo Weinhold esac 199*fc8967f1SIngo Weinhold 200*fc8967f1SIngo Weinhold HAIKU_PACKAGING_ARCH=$HAIKU_CPU 201*fc8967f1SIngo Weinhold 2027c4641d0SOliver Tappe case $HAIKU_GCC_RAW_VERSION in 2038b5934c9SIngo Weinhold 4.*) 2045b0f7b1bSOliver Tappe # for gcc 4 we use the libstdc++ and libsupc++ that come with the 2055b0f7b1bSOliver Tappe # compiler 2067c4641d0SOliver Tappe HAIKU_STATIC_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.a` 2077c4641d0SOliver Tappe HAIKU_SHARED_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.so` 2087c4641d0SOliver Tappe HAIKU_STATIC_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.a` 2097c4641d0SOliver Tappe HAIKU_SHARED_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.so` 21014210488SMichael Lotz 211aaeadfcbSAlex Smith # If the architecture has separate runtime libraries for the 212aaeadfcbSAlex Smith # kernel, use them. 213aaeadfcbSAlex Smith HAIKU_KERNEL_LIBGCC=`$HAIKU_CC -print-file-name=libgcc-kernel.a` 214aaeadfcbSAlex Smith if [ $HAIKU_KERNEL_LIBGCC = libgcc-kernel.a ]; then 215aaeadfcbSAlex Smith HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC 216aaeadfcbSAlex Smith fi 217aaeadfcbSAlex Smith HAIKU_KERNEL_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++-kernel.a` 218aaeadfcbSAlex Smith if [ $HAIKU_KERNEL_LIBSUPCXX = libsupc++-kernel.a ]; then 219aaeadfcbSAlex Smith HAIKU_KERNEL_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX 220aaeadfcbSAlex Smith fi 221aaeadfcbSAlex Smith 22214210488SMichael Lotz local headers 2237c4641d0SOliver Tappe if [ -d $gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION ]; then 2247c4641d0SOliver Tappe headers=$gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION 22514210488SMichael Lotz else 2267c4641d0SOliver Tappe headers=$gccdir/../../../../include/c++/$HAIKU_GCC_RAW_VERSION 22714210488SMichael Lotz fi 22814210488SMichael Lotz 2297c4641d0SOliver Tappe HAIKU_CXX_HEADERS_DIR=$headers 2307c4641d0SOliver Tappe for d in $HAIKU_GCC_MACHINE backward ext; do 23129ef597dSIngo Weinhold # Note: We need the line break, otherwise the line might become 23229ef597dSIngo Weinhold # too long for jam (512 bytes max). 2337c4641d0SOliver Tappe HAIKU_CXX_HEADERS_DIR="$HAIKU_CXX_HEADERS_DIR 23429ef597dSIngo Weinhold $headers/$d" 2358b5934c9SIngo Weinhold done 236274b450aSMarcus Overhagen 2373f9f9f9aSIngo Weinhold # Unset the HAIKU_{SHARED,STATIC}_LIB{STD,SUP}CXX variables, if the 2383f9f9f9aSIngo Weinhold # compiler didn't give us actual file names. Otherwise resolve 2393f9f9f9aSIngo Weinhold # symlinks to avoid problems when copying the libraries to the 2403f9f9f9aSIngo Weinhold # image. 2418b5934c9SIngo Weinhold 2427c4641d0SOliver Tappe if [ $HAIKU_STATIC_LIBSTDCXX = libstdc++.a ]; then 2437c4641d0SOliver Tappe HAIKU_STATIC_LIBSTDCXX= 2443f9f9f9aSIngo Weinhold else 245b29b48b1SMatt Madia HAIKU_STATIC_LIBSTDCXX=`$readlink $HAIKU_STATIC_LIBSTDCXX` 2468b5934c9SIngo Weinhold fi 2473f9f9f9aSIngo Weinhold 248ffe8b20cSIngo Weinhold if [ $HAIKU_SHARED_LIBSTDCXX = libstdc++.so ]; then 249ffe8b20cSIngo Weinhold HAIKU_SHARED_LIBSTDCXX= 2503f9f9f9aSIngo Weinhold else 251b29b48b1SMatt Madia HAIKU_SHARED_LIBSTDCXX=`$readlink $HAIKU_SHARED_LIBSTDCXX` 252ffe8b20cSIngo Weinhold fi 2533f9f9f9aSIngo Weinhold 2547c4641d0SOliver Tappe if [ $HAIKU_STATIC_LIBSUPCXX = libsupc++.a ]; then 2557c4641d0SOliver Tappe HAIKU_STATIC_LIBSUPCXX= 2563f9f9f9aSIngo Weinhold else 257b29b48b1SMatt Madia HAIKU_STATIC_LIBSUPCXX=`$readlink $HAIKU_STATIC_LIBSUPCXX` 258c89fc875SIngo Weinhold fi 2593f9f9f9aSIngo Weinhold 260ffe8b20cSIngo Weinhold if [ $HAIKU_SHARED_LIBSUPCXX = libsupc++.so ]; then 261ffe8b20cSIngo Weinhold HAIKU_SHARED_LIBSUPCXX= 2623f9f9f9aSIngo Weinhold else 263b29b48b1SMatt Madia HAIKU_SHARED_LIBSUPCXX=`$readlink $HAIKU_SHARED_LIBSUPCXX` 264ffe8b20cSIngo Weinhold fi 2658b5934c9SIngo Weinhold ;; 2666cc8eecfSOliver Tappe 2.9*) 2675b0f7b1bSOliver Tappe # check for correct (most up-to-date) legacy compiler and complain 2685b0f7b1bSOliver Tappe # if an older one is installed 2697c4641d0SOliver Tappe if [ $HAIKU_GCC_RAW_VERSION != $haikuRequiredLegacyGCCVersion ]; then 2705b0f7b1bSOliver Tappe echo "GCC version $haikuRequiredLegacyGCCVersion is required!"; 2715b0f7b1bSOliver Tappe echo "Please download it from www.haiku-os.org..."; 2725b0f7b1bSOliver Tappe exit 1; 2735b0f7b1bSOliver Tappe fi 274aaeadfcbSAlex Smith 275aaeadfcbSAlex Smith HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC 276aaeadfcbSAlex Smith HAIKU_KERNEL_LIBSUPCXX= 277*fc8967f1SIngo Weinhold HAIKU_PACKAGING_ARCH=x86_gcc2 2785b0f7b1bSOliver Tappe ;; 2798b5934c9SIngo Weinhold esac 28065ad1ba3SAlex Smith 2814591ebc9SAlex Smith case $HAIKU_GCC_MACHINE in 2824591ebc9SAlex Smith x86_64-*) 283c864ba1aSAlex Smith # Boot loader is 32-bit, need the 32-bit libs. 28465ad1ba3SAlex Smith HAIKU_BOOT_LIBGCC=`$HAIKU_CC -m32 -print-libgcc-file-name` 28565ad1ba3SAlex Smith HAIKU_BOOT_LIBSUPCXX=`$HAIKU_CC -m32 -print-file-name=libsupc++.a` 2864591ebc9SAlex Smith ;; 2874591ebc9SAlex Smith *) 28865ad1ba3SAlex Smith HAIKU_BOOT_LIBGCC=$HAIKU_GCC_LIBGCC 28965ad1ba3SAlex Smith HAIKU_BOOT_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX 290338b8dc3SIngo Weinhold ;; 291338b8dc3SIngo Weinhold esac 292338b8dc3SIngo Weinhold} 293338b8dc3SIngo Weinhold 294338b8dc3SIngo Weinhold# set_default_value 295338b8dc3SIngo Weinhold# 296338b8dc3SIngo Weinhold# Set the value for a variable, if no value is set yet. 297338b8dc3SIngo Weinhold# 298338b8dc3SIngo Weinholdset_default_value() 299338b8dc3SIngo Weinhold{ 300338b8dc3SIngo Weinhold eval "$1=\${$1-$2}" 301338b8dc3SIngo Weinhold} 302338b8dc3SIngo Weinhold 303338b8dc3SIngo Weinhold# get_build_tool_path 304338b8dc3SIngo Weinhold# 305338b8dc3SIngo Weinhold# Gets a usable absolute path of a build tool. 306338b8dc3SIngo Weinhold# 307338b8dc3SIngo Weinholdget_build_tool_path() 308338b8dc3SIngo Weinhold{ 309338b8dc3SIngo Weinhold local var="HAIKU_$1" 310338b8dc3SIngo Weinhold local tool=$2 311338b8dc3SIngo Weinhold local path="${crossToolsPrefix}$tool" 312338b8dc3SIngo Weinhold 313338b8dc3SIngo Weinhold if [ -f "$path" ]; then 314338b8dc3SIngo Weinhold # get absolute path 315a559f87aSFrançois Revol local oldPwd="`pwd`" 316a559f87aSFrançois Revol cd "`dirname "$path"`" 317a559f87aSFrançois Revol path="`pwd`/`basename "$path"`" 318338b8dc3SIngo Weinhold cd $oldPwd 319338b8dc3SIngo Weinhold else 3207fe2e06cSMatt Madia which "$path" > /dev/null 2>&1 || { 321338b8dc3SIngo Weinhold echo "Build tool \"$path\" not found." >&2 322338b8dc3SIngo Weinhold exit 1 323338b8dc3SIngo Weinhold } 324338b8dc3SIngo Weinhold fi 325338b8dc3SIngo Weinhold 326338b8dc3SIngo Weinhold eval "$var=$path" 327338b8dc3SIngo Weinhold} 328338b8dc3SIngo Weinhold 329338b8dc3SIngo Weinhold# get cwd and the source directory 330338b8dc3SIngo WeinholdcurrentDir=`pwd` 3316e7c6fe5SIngo Weinholdcd `dirname "$0"` 332338b8dc3SIngo WeinholdsourceDir=`pwd` 3336e7c6fe5SIngo Weinholdcd "$currentDir" 334338b8dc3SIngo Weinhold 33555d267a4SFrançois Revol# backup the passed arguments 33655d267a4SFrançois RevolconfigureArgs="$@" 33755d267a4SFrançois Revol 3387c4641d0SOliver Tappe# internal default parameter values 339022fa244SIngo Weinhold# 34052a38012Sejakowatzplatform=`uname` 3415abd9a46SIngo WeinholdplatformMachine=`uname -m` 342338b8dc3SIngo WeinholdcrossToolsPrefix= 343338b8dc3SIngo WeinholdbuildCrossTools= 34429ef597dSIngo WeinholdbuildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools" 34520ab75e6SIngo WeinholdbuildCrossToolsMachine= 34660d8d8fcSIngo WeinholdbuildCrossToolsJobs= 3477c4641d0SOliver Tappe 3487c4641d0SOliver Tappe# exported (BuildSetup) default parameter values 3497c4641d0SOliver Tappe# 3507c4641d0SOliver TappeHAIKU_GCC_RAW_VERSION= 351*fc8967f1SIngo WeinholdHAIKU_CPU=x86 352*fc8967f1SIngo WeinholdHAIKU_PACKAGING_ARCH=x86_gcc2 3537c4641d0SOliver TappeHAIKU_GCC_MACHINE=i586-pc-haiku 3547c4641d0SOliver TappeHAIKU_STATIC_LIBSTDCXX= 3557c4641d0SOliver TappeHAIKU_SHARED_LIBSTDCXX= 3567c4641d0SOliver TappeHAIKU_STATIC_LIBSUPCXX= 3577c4641d0SOliver TappeHAIKU_SHARED_LIBSUPCXX= 3587c4641d0SOliver TappeHAIKU_CXX_HEADERS_DIR= 3597c4641d0SOliver TappeHOST_GCC_RAW_VERSION=`gcc -dumpversion` 3607c4641d0SOliver TappeHOST_GCC_MACHINE=`gcc -dumpmachine` 3617c4641d0SOliver TappeHAIKU_INCLUDE_GPL_ADDONS=0 3627c4641d0SOliver TappeHAIKU_INCLUDE_PATENTED_CODE=0 36376fa0be3SIngo WeinholdHAIKU_INCLUDE_SOURCES=0 3647c4641d0SOliver TappeHAIKU_INCLUDE_3RDPARTY=0 3657c4641d0SOliver TappeHAIKU_ENABLE_MULTIUSER=0 3667c4641d0SOliver TappeHAIKU_DISTRO_COMPATIBILITY=default 3677c4641d0SOliver TappeTARGET_PLATFORM=haiku 3687c4641d0SOliver TappeHAIKU_USE_GCC_PIPE=0 369748c10f2SJerome DuvalHAIKU_USE_GCC_GRAPHITE=0 3707986925fSIngo WeinholdHAIKU_HOST_USE_32BIT=0 3717986925fSIngo WeinholdHAIKU_HOST_USE_XATTR=0 372bc96e8f3SIngo WeinholdHAIKU_HOST_USE_XATTR_REF=0 3732ebcd86dSIngo WeinholdHAIKU_HOST_BUILD_ONLY=0 3747c4641d0SOliver TappeHOST_GCC_LD=`gcc -print-prog-name=ld` 3757c4641d0SOliver TappeHOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy` 376c505b276SFrançois RevolSFDISK_BINARY=sfdisk 377c505b276SFrançois RevolHOST_SFDISK=$SFDISK_BINARY 3782a5d0aafSIngo WeinholdHOST_SHA256= 3792a5d0aafSIngo Weinhold 3803942ca0dSIngo Weinholdif sha256sum < /dev/null > /dev/null 2>&1; then 3812a5d0aafSIngo Weinhold HOST_SHA256=sha256sum 3823942ca0dSIngo Weinholdelif sha256 < /dev/null > /dev/null 2>&1; then 3832a5d0aafSIngo Weinhold HOST_SHA256="sha256 -q" 3842a5d0aafSIngo Weinholdelse 3852a5d0aafSIngo Weinhold echo "Error: Neither sha256sum nor sha256 seem to be available!" >&2 3862a5d0aafSIngo Weinhold exit 1 3872a5d0aafSIngo Weinholdfi 388338b8dc3SIngo Weinhold 389983aba29SOliver TappehaikuRequiredLegacyGCCVersion="2.95.3-haiku-2013_07_15" 390a559f87aSFrançois Revolexport haikuRequiredLegacyGCCVersion 391af4bf973SOliver Tappe # version of legacy gcc required to build haiku 392af4bf973SOliver Tappe 393338b8dc3SIngo Weinholdset_default_value HAIKU_AR ar 394338b8dc3SIngo Weinholdset_default_value HAIKU_CC gcc 395338b8dc3SIngo Weinholdset_default_value HAIKU_LD ld 396338b8dc3SIngo Weinholdset_default_value HAIKU_OBJCOPY objcopy 397338b8dc3SIngo Weinholdset_default_value HAIKU_RANLIB ranlib 398385d69fcSAlex Smithset_default_value HAIKU_ELFEDIT elfedit 39977e84f21SIngo Weinholdset_default_value HAIKU_YASM yasm 40035f39081SMatt Madiaset_default_value HAIKU_STRIP strip 401338b8dc3SIngo Weinholdset_default_value HAIKU_CPPFLAGS "" 402338b8dc3SIngo Weinholdset_default_value HAIKU_CCFLAGS "" 403338b8dc3SIngo Weinholdset_default_value HAIKU_CXXFLAGS "" 404338b8dc3SIngo Weinholdset_default_value HAIKU_LDFLAGS "" 40523eb9a9eSFrançois Revolset_default_value HAIKU_ARFLAGS cru 406338b8dc3SIngo Weinholdset_default_value HAIKU_UNARFLAGS x 40762339647SAxel Dörfler 4087c4641d0SOliver Tappe# determine output directory 4097c4641d0SOliver Tappeif [ "$currentDir" = "$sourceDir" ]; then 4107c4641d0SOliver Tappe outputDir=$currentDir/generated 4117c4641d0SOliver Tappeelse 4127c4641d0SOliver Tappe outputDir=$currentDir 4137c4641d0SOliver Tappefi 4147c4641d0SOliver TappebuildOutputDir="$outputDir/build" 4157c4641d0SOliver TappeHAIKU_BUILD_ATTRIBUTES_DIR="$outputDir/attributes" 4167c4641d0SOliver TappebuildConfigFile="$buildOutputDir/BuildConfig" 4177c4641d0SOliver Tappe 4187c4641d0SOliver Tappe# check for update request 4197c4641d0SOliver Tappeif [ "$1" = "--update" ]; then 4207c4641d0SOliver Tappe if ! [ -e "$buildConfigFile" ]; then 4217c4641d0SOliver Tappe echo $0 --update: \'$buildConfigFile\' not found - updating not possible. 4227c4641d0SOliver Tappe exit 1 4237c4641d0SOliver Tappe fi 4247c4641d0SOliver Tappe if ! type perl >/dev/null 2>&1; then 4257c4641d0SOliver Tappe echo $0 --update: \'perl\' not found - updating not possible. 4267c4641d0SOliver Tappe exit 1 4277c4641d0SOliver Tappe fi 4287c4641d0SOliver Tappe # convert BuildConfig from jam format to shell format and evaluate it 4297c4641d0SOliver Tappe shellConfigFile="${buildConfigFile}.shell" 4307c4641d0SOliver Tappe perl "$sourceDir/build/scripts/convert_build_config_to_shell_format.pl" \ 4317c4641d0SOliver Tappe <"$buildConfigFile" >"$shellConfigFile" 4327c4641d0SOliver Tappe . "$shellConfigFile" 4337c4641d0SOliver Tappe rm "$shellConfigFile" 4347c4641d0SOliver Tappe shift 4357c4641d0SOliver Tappefi 4367c4641d0SOliver Tappe 437022fa244SIngo Weinhold# parse parameters 438022fa244SIngo Weinhold# 43920ab75e6SIngo Weinholdwhile [ $# -gt 0 ] ; do 440022fa244SIngo Weinhold case "$1" in 441a5b60fa8SOliver Tappe --build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;; 4429b0dd528SIngo Weinhold --build-cross-tools-gcc4) 4439b0dd528SIngo Weinhold assertparams "$1" 2 $# 4449b0dd528SIngo Weinhold buildCrossTools=$3 4459b0dd528SIngo Weinhold buildCrossToolsScript="${buildCrossToolsScript}_gcc4" 44620ab75e6SIngo Weinhold case "$2" in 4477c4641d0SOliver Tappe x86) HAIKU_GCC_MACHINE=i586-pc-haiku;; 448*fc8967f1SIngo Weinhold x86_64) HAIKU_GCC_MACHINE=x86_64-unknown-haiku;; 449*fc8967f1SIngo Weinhold ppc) HAIKU_GCC_MACHINE=powerpc-apple-haiku;; 450*fc8967f1SIngo Weinhold m68k) HAIKU_GCC_MACHINE=m68k-unknown-haiku;; 451*fc8967f1SIngo Weinhold arm) HAIKU_GCC_MACHINE=arm-unknown-haiku;; 452*fc8967f1SIngo Weinhold mipsel) HAIKU_GCC_MACHINE=mipsel-unknown-haiku; 45320ab75e6SIngo Weinhold *) echo "Unsupported target architecture: $2" 45420ab75e6SIngo Weinhold exit 1;; 45520ab75e6SIngo Weinhold esac 4567c4641d0SOliver Tappe buildCrossToolsMachine=$HAIKU_GCC_MACHINE 4579b0dd528SIngo Weinhold shift 3 4589b0dd528SIngo Weinhold ;; 4599b0dd528SIngo Weinhold --cross-tools-prefix) 4609b0dd528SIngo Weinhold assertparam "$1" $# 4619b0dd528SIngo Weinhold crossToolsPrefix=$2 4629b0dd528SIngo Weinhold shift 2 4639b0dd528SIngo Weinhold ;; 464a66c32ddSIngo Weinhold --distro-compatibility) 4659b0dd528SIngo Weinhold assertparam "$1" $# 4667c4641d0SOliver Tappe HAIKU_DISTRO_COMPATIBILITY=$2 4677c4641d0SOliver Tappe case "$HAIKU_DISTRO_COMPATIBILITY" in 468a66c32ddSIngo Weinhold official) ;; 469a66c32ddSIngo Weinhold compatible) ;; 470a66c32ddSIngo Weinhold default) ;; 471a66c32ddSIngo Weinhold *) echo "Invalid distro compatibility" \ 4727c4641d0SOliver Tappe "level: $HAIKU_DISTRO_COMPATIBILITY" 473a66c32ddSIngo Weinhold exit 1;; 474a66c32ddSIngo Weinhold esac 4759b0dd528SIngo Weinhold shift 2 4769b0dd528SIngo Weinhold ;; 4777c4641d0SOliver Tappe --enable-multiuser) HAIKU_ENABLE_MULTIUSER=1; shift 1;; 47860d8d8fcSIngo Weinhold --help | -h) usage; exit 0;; 4792ebcd86dSIngo Weinhold --host-only) HAIKU_HOST_BUILD_ONLY=1; shift 1;; 4807c4641d0SOliver Tappe --include-gpl-addons) HAIKU_INCLUDE_GPL_ADDONS=1; shift 1;; 4817c4641d0SOliver Tappe --include-patented-code) HAIKU_INCLUDE_PATENTED_CODE=1; shift 1;; 48276fa0be3SIngo Weinhold --include-sources) HAIKU_INCLUDE_SOURCES=1; shift 1;; 4837c4641d0SOliver Tappe --include-3rdparty) HAIKU_INCLUDE_3RDPARTY=1; shift 1;; 48460d8d8fcSIngo Weinhold -j*) buildCrossToolsJobs="$1"; shift 1;; 4857c4641d0SOliver Tappe --target=*) TARGET_PLATFORM=`echo $1 | cut -d'=' -f2-`; shift 1;; 4867c4641d0SOliver Tappe --use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;; 487748c10f2SJerome Duval --use-gcc-graphite) HAIKU_USE_GCC_GRAPHITE=1; shift 1;; 4887986925fSIngo Weinhold --use-32bit) HAIKU_HOST_USE_32BIT=1; shift 1;; 4897986925fSIngo Weinhold --use-xattr) HAIKU_HOST_USE_XATTR=1; shift 1;; 490bc96e8f3SIngo Weinhold --use-xattr-ref) HAIKU_HOST_USE_XATTR_REF=1; shift 1;; 491022fa244SIngo Weinhold *) echo Invalid argument: \`$1\'; exit 1;; 492022fa244SIngo Weinhold esac 493022fa244SIngo Weinholddone 494022fa244SIngo Weinhold 4950df3cc9cSIngo Weinhold# detect the build platform 496338b8dc3SIngo Weinholdcase "${platform}" in 4970df3cc9cSIngo Weinhold BeOS) revision=`uname -r` 4980df3cc9cSIngo Weinhold case "$revision" in 4997c4641d0SOliver Tappe 6.*) HOST_PLATFORM=dano ;; 5007c4641d0SOliver Tappe 5.1) HOST_PLATFORM=dano ;; 5017c4641d0SOliver Tappe 5.0.4) HOST_PLATFORM=bone ;; 5027c4641d0SOliver Tappe 5.0*) HOST_PLATFORM=r5 ;; 5030df3cc9cSIngo Weinhold *) echo Unknown BeOS version: $revision 5040df3cc9cSIngo Weinhold exit 1 ;; 5050df3cc9cSIngo Weinhold esac 5060df3cc9cSIngo Weinhold ;; 5077c4641d0SOliver Tappe Darwin) HOST_PLATFORM=darwin ;; 5087c4641d0SOliver Tappe FreeBSD) HOST_PLATFORM=freebsd 509c505b276SFrançois Revol SFDISK_BINARY=sfdisk-linux 5107986925fSIngo Weinhold if [ "$HAIKU_HOST_USE_32BIT" = 1 ] ; then 5115abd9a46SIngo Weinhold echo Unsupported platform: FreeBSD ${platformMachine} 512308c212cSIngo Weinhold exit 1 513308c212cSIngo Weinhold fi ;; 5147c4641d0SOliver Tappe Haiku) HOST_PLATFORM=haiku_host ;; 5157c4641d0SOliver Tappe Linux) HOST_PLATFORM=linux ;; 5167c4641d0SOliver Tappe OpenBSD) HOST_PLATFORM=openbsd ;; 5177c4641d0SOliver Tappe SunOS) HOST_PLATFORM=sunos ;; 5187c4641d0SOliver Tappe CYGWIN_NT-*) HOST_PLATFORM=cygwin ;; 519338b8dc3SIngo Weinhold *) echo Unsupported platform: ${platform} 5204cbe4925SAxel Dörfler exit 1 ;; 5214cbe4925SAxel Dörfleresac 52252a38012Sejakowatz 523c505b276SFrançois Revol# check common locations for sfdisk 524c505b276SFrançois Revolfor sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do 525c505b276SFrançois Revol if [ -e ${sfdiskDir}/${SFDISK_BINARY} ]; then 526c505b276SFrançois Revol HOST_SFDISK=${sfdiskDir}/${SFDISK_BINARY} 527c505b276SFrançois Revol fi 528c505b276SFrançois Revoldone 529c505b276SFrançois Revol 5300962132cSAlex Smith# check for case-sensitive filesystem 5310962132cSAlex Smithmkdir haikuCaseTest 2>/dev/null 5320962132cSAlex Smithmkdir haikucasetest 2>/dev/null 5330962132cSAlex SmithcaseInsensitive=$? 53497f5a0bdSAlex Smithrmdir haikuCaseTest haikucasetest 2>/dev/null 5350962132cSAlex Smithif [ $caseInsensitive != 0 ]; then 5363ecc5287SMichael Lotz echo "You need a case-sensitive file-system to build Haiku." 5370962132cSAlex Smith if [ $HOST_PLATFORM = "darwin" ]; then 5380962132cSAlex Smith echo "You can create a case-sensitive disk image using Disk Utility and use" 5390962132cSAlex Smith echo "it to store the Haiku sources on." 5403ecc5287SMichael Lotz fi 5410962132cSAlex Smith exit 1 5423ecc5287SMichael Lotzfi 5433ecc5287SMichael Lotz 544338b8dc3SIngo Weinhold# create output directory 5456e7c6fe5SIngo Weinholdmkdir -p "$buildOutputDir" || exit 1 546338b8dc3SIngo Weinhold 5472ebcd86dSIngo Weinholdif [ "$HAIKU_HOST_BUILD_ONLY" = 1 ]; then 5482ebcd86dSIngo Weinhold invalidCommand=$sourceDir/build/scripts/host_build_only 5492ebcd86dSIngo Weinhold HAIKU_AR=$invalidCommand 5502ebcd86dSIngo Weinhold HAIKU_CC=$invalidCommand 5512ebcd86dSIngo Weinhold HAIKU_LD=$invalidCommand 5522ebcd86dSIngo Weinhold HAIKU_OBJCOPY=$invalidCommand 5532ebcd86dSIngo Weinhold HAIKU_RANLIB=$invalidCommand 5542ebcd86dSIngo Weinhold HAIKU_ELFEDIT=$invalidCommand 5552ebcd86dSIngo Weinhold HAIKU_YASM=$invalidCommand 5562ebcd86dSIngo Weinhold HAIKU_STRIP=$invalidCommand 5572ebcd86dSIngo Weinholdelse 558338b8dc3SIngo Weinhold # build cross tools from sources 559338b8dc3SIngo Weinhold if [ -n "$buildCrossTools" ]; then 5600837d6c6SJerome Duval export HAIKU_USE_GCC_GRAPHITE 56120ab75e6SIngo Weinhold "$buildCrossToolsScript" $buildCrossToolsMachine "$sourceDir" \ 56260d8d8fcSIngo Weinhold "$buildCrossTools" "$outputDir" $buildCrossToolsJobs || exit 1 5637c4641d0SOliver Tappe crossToolsPrefix="$outputDir/cross-tools/bin/${HAIKU_GCC_MACHINE}-" 564338b8dc3SIngo Weinhold fi 565338b8dc3SIngo Weinhold 566338b8dc3SIngo Weinhold # cross tools 567338b8dc3SIngo Weinhold if [ -n "$crossToolsPrefix" ]; then 568338b8dc3SIngo Weinhold get_build_tool_path AR ar 569338b8dc3SIngo Weinhold get_build_tool_path CC gcc 570338b8dc3SIngo Weinhold get_build_tool_path LD ld 571338b8dc3SIngo Weinhold get_build_tool_path OBJCOPY objcopy 572338b8dc3SIngo Weinhold get_build_tool_path RANLIB ranlib 57335f39081SMatt Madia get_build_tool_path STRIP strip 574338b8dc3SIngo Weinhold fi 575338b8dc3SIngo Weinhold 576338b8dc3SIngo Weinhold # prepare gcc settings 577338b8dc3SIngo Weinhold standard_gcc_settings 578338b8dc3SIngo Weinhold 579b7777272SAlex Smith # cross tools for gcc4 builds 580b7777272SAlex Smith if [ -n "$crossToolsPrefix" ]; then 581bd16f0ddSAlex Smith case $HAIKU_GCC_RAW_VERSION in 582bd16f0ddSAlex Smith 4.*) 583385d69fcSAlex Smith get_build_tool_path ELFEDIT elfedit 584bd16f0ddSAlex Smith ;; 585bd16f0ddSAlex Smith esac 58652a38012Sejakowatz fi 58752a38012Sejakowatz 588eedc3d0bSIngo Weinhold # check whether the Haiku compiler really targets Haiku or BeOS 5897c4641d0SOliver Tappe case "$HAIKU_GCC_MACHINE" in 590eedc3d0bSIngo Weinhold *-*-haiku) ;; 591eedc3d0bSIngo Weinhold *-*-beos) ;; 592eedc3d0bSIngo Weinhold *) echo The compiler specified as Haiku target compiler is not a valid \ 593eedc3d0bSIngo Weinhold Haiku cross-compiler. Please see ReadMe.cross-compile. >&2 594eedc3d0bSIngo Weinhold echo compiler: $HAIKU_CC 5957c4641d0SOliver Tappe echo compiler is configured for target: $HAIKU_GCC_MACHINE 596eedc3d0bSIngo Weinhold exit 1 ;; 597eedc3d0bSIngo Weinhold esac 5982ebcd86dSIngo Weinholdfi 599eedc3d0bSIngo Weinhold 60052a38012Sejakowatz# Generate BuildConfig 6017c4641d0SOliver Tappecat << EOF > "$buildConfigFile" 60252a38012Sejakowatz# BuildConfig 603ab2540c4SIngo Weinhold# Note: This file has been automatically generated by configure with the 604ab2540c4SIngo Weinhold# following arguments: 60555d267a4SFrançois Revol# ${configureArgs} 60652a38012Sejakowatz 6077c4641d0SOliver TappeTARGET_PLATFORM ?= "${TARGET_PLATFORM}" ; 6087c4641d0SOliver TappeHOST_PLATFORM ?= "${HOST_PLATFORM}" ; 609338b8dc3SIngo Weinhold 6107c4641d0SOliver TappeHAIKU_INCLUDE_GPL_ADDONS ?= "${HAIKU_INCLUDE_GPL_ADDONS}" ; 6117c4641d0SOliver TappeHAIKU_INCLUDE_PATENTED_CODE ?= "${HAIKU_INCLUDE_PATENTED_CODE}" ; 61276fa0be3SIngo WeinholdHAIKU_INCLUDE_SOURCES ?= "${HAIKU_INCLUDE_SOURCES}" ; 6137c4641d0SOliver TappeHAIKU_INCLUDE_3RDPARTY ?= "${HAIKU_INCLUDE_3RDPARTY}" ; 6147c4641d0SOliver TappeHAIKU_ENABLE_MULTIUSER ?= "${HAIKU_ENABLE_MULTIUSER}" ; 6157c4641d0SOliver TappeHAIKU_DISTRO_COMPATIBILITY ?= "${HAIKU_DISTRO_COMPATIBILITY}" ; 6167c4641d0SOliver TappeHAIKU_USE_GCC_PIPE ?= "${HAIKU_USE_GCC_PIPE}" ; 617748c10f2SJerome DuvalHAIKU_USE_GCC_GRAPHITE ?= "${HAIKU_USE_GCC_GRAPHITE}" ; 6187986925fSIngo WeinholdHAIKU_HOST_USE_32BIT ?= "${HAIKU_HOST_USE_32BIT}" ; 6197986925fSIngo WeinholdHAIKU_HOST_USE_XATTR ?= "${HAIKU_HOST_USE_XATTR}" ; 620bc96e8f3SIngo WeinholdHAIKU_HOST_USE_XATTR_REF ?= "${HAIKU_HOST_USE_XATTR_REF}" ; 6212ebcd86dSIngo WeinholdHAIKU_HOST_BUILD_ONLY ?= "${HAIKU_HOST_BUILD_ONLY}" ; 622eccc7665SIngo Weinhold 6237c4641d0SOliver TappeHAIKU_GCC_RAW_VERSION ?= ${HAIKU_GCC_RAW_VERSION} ; 6247c4641d0SOliver TappeHAIKU_GCC_MACHINE ?= ${HAIKU_GCC_MACHINE} ; 625338b8dc3SIngo WeinholdHAIKU_GCC_LIB_DIR ?= ${HAIKU_GCC_LIB_DIR} ; 626338b8dc3SIngo WeinholdHAIKU_GCC_HEADERS_DIR ?= ${HAIKU_GCC_HEADERS_DIR} ; 627338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC ?= ${HAIKU_GCC_LIBGCC} ; 628338b8dc3SIngo Weinhold 629*fc8967f1SIngo WeinholdHAIKU_CPU ?= ${HAIKU_CPU} ; 630*fc8967f1SIngo WeinholdHAIKU_PACKAGING_ARCH ?= ${HAIKU_PACKAGING_ARCH} ; 631*fc8967f1SIngo Weinhold 6327c4641d0SOliver TappeHAIKU_STATIC_LIBSTDC++ ?= ${HAIKU_STATIC_LIBSTDCXX} ; 6337c4641d0SOliver TappeHAIKU_SHARED_LIBSTDC++ ?= ${HAIKU_SHARED_LIBSTDCXX} ; 6347c4641d0SOliver TappeHAIKU_STATIC_LIBSUPC++ ?= ${HAIKU_STATIC_LIBSUPCXX} ; 6357c4641d0SOliver TappeHAIKU_SHARED_LIBSUPC++ ?= ${HAIKU_SHARED_LIBSUPCXX} ; 6367c4641d0SOliver TappeHAIKU_C++_HEADERS_DIR ?= ${HAIKU_CXX_HEADERS_DIR} ; 6378b5934c9SIngo Weinhold 638c864ba1aSAlex SmithHAIKU_KERNEL_LIBGCC ?= ${HAIKU_KERNEL_LIBGCC} ; 639c864ba1aSAlex SmithHAIKU_KERNEL_LIBSUPC++ ?= ${HAIKU_KERNEL_LIBSUPCXX} ; 64065ad1ba3SAlex SmithHAIKU_BOOT_LIBGCC ?= ${HAIKU_BOOT_LIBGCC} ; 64165ad1ba3SAlex SmithHAIKU_BOOT_LIBSUPC++ ?= ${HAIKU_BOOT_LIBSUPCXX} ; 64265ad1ba3SAlex Smith 6437c4641d0SOliver TappeHAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ; 644338b8dc3SIngo Weinhold 645338b8dc3SIngo WeinholdHAIKU_AR ?= ${HAIKU_AR} ; 646338b8dc3SIngo WeinholdHAIKU_CC ?= ${HAIKU_CC} ; 647338b8dc3SIngo WeinholdHAIKU_LD ?= ${HAIKU_LD} ; 648338b8dc3SIngo WeinholdHAIKU_OBJCOPY ?= ${HAIKU_OBJCOPY} ; 649338b8dc3SIngo WeinholdHAIKU_RANLIB ?= ${HAIKU_RANLIB} ; 650385d69fcSAlex SmithHAIKU_ELFEDIT ?= ${HAIKU_ELFEDIT} ; 65177e84f21SIngo WeinholdHAIKU_YASM ?= ${HAIKU_YASM} ; 65235f39081SMatt MadiaHAIKU_STRIP ?= ${HAIKU_STRIP} ; 653338b8dc3SIngo WeinholdHAIKU_CPPFLAGS ?= ${HAIKU_CPPFLAGS} ; 654338b8dc3SIngo WeinholdHAIKU_CCFLAGS ?= ${HAIKU_CCFLAGS} ; 6550d47dc5dSAlex SmithHAIKU_C++FLAGS ?= ${HAIKU_CXXFLAGS} ; 656338b8dc3SIngo WeinholdHAIKU_LDFLAGS ?= ${HAIKU_LDFLAGS} ; 657338b8dc3SIngo WeinholdHAIKU_ARFLAGS ?= ${HAIKU_ARFLAGS} ; 658338b8dc3SIngo WeinholdHAIKU_UNARFLAGS ?= ${HAIKU_UNARFLAGS} ; 659338b8dc3SIngo Weinhold 6607c4641d0SOliver TappeHOST_GCC_RAW_VERSION ?= ${HOST_GCC_RAW_VERSION} ; 6617c4641d0SOliver TappeHOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ; 6627c4641d0SOliver TappeHOST_LD ?= ${HOST_GCC_LD} ; 6637c4641d0SOliver TappeHOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ; 664c505b276SFrançois RevolHOST_SFDISK ?= ${HOST_SFDISK} ; 6652a5d0aafSIngo WeinholdHOST_SHA256 ?= ${HOST_SHA256} ; 6668b5934c9SIngo Weinhold 667c4786ea6SlilloEOF 668c4786ea6Slillo 669b1e5b60cSAxel Dörfler# Libgcc.a objects 670b1e5b60cSAxel Dörfler 6716e7c6fe5SIngo Weinholdcat << EOF > "$buildOutputDir/libgccObjects" 672b1e5b60cSAxel Dörfler# libgcc.a objects to be linked against libroot.so 673b1e5b60cSAxel Dörfler# Note: This file has been automatically generated by configure. 674b1e5b60cSAxel Dörfler 675338b8dc3SIngo WeinholdHAIKU_GCC_LIBGCC_OBJECTS ?= ${HAIKU_GCC_LIBGCC_OBJECTS} ; 676b1e5b60cSAxel DörflerEOF 677b1e5b60cSAxel Dörfler 6789b0dd528SIngo Weinhold# Generate a boot strap Jamfile in the output directory. 679338b8dc3SIngo Weinhold 680338b8dc3SIngo Weinholdcat << EOF > $outputDir/Jamfile 681338b8dc3SIngo Weinhold# automatically generated Jamfile 682338b8dc3SIngo Weinhold 683338b8dc3SIngo WeinholdHAIKU_TOP = ${sourceDir} ; 684338b8dc3SIngo WeinholdHAIKU_OUTPUT_DIR = ${outputDir} ; 685338b8dc3SIngo Weinhold 686338b8dc3SIngo Weinholdinclude [ FDirName \$(HAIKU_TOP) Jamfile ] ; 687338b8dc3SIngo Weinhold 688338b8dc3SIngo WeinholdEOF 689