1#!/bin/sh 2# 3# configure [ <options> ] 4 5# usage 6# 7# Prints usage. 8# 9usage() 10{ 11 cat << EOF 12 13Usage: $0 <options> 14options: 15 --alternative-gcc-output-dir <dir> 16 Build a Haiku installation that supports running 17 executables built with a gcc version incompatible 18 with the primary gcc (e.g. gcc 2 executables under 19 a gcc 4 Haiku or vice versa). <dir> specifies the 20 output directory of the other gcc. The directory 21 must already be fully configured. 22 Note, that a sub-jam will be executed when 23 building Haiku. When using a jam that is not 24 simply invoked by "jam", the JAM build variable 25 needs to be set accordingly. 26 To disable building the alternative libraries 27 the variable HAIKU_ADD_ALTERNATIVE_GCC_LIBS can be 28 unset in the UserBuildConfig file. 29 --build-cross-tools <build tools dir> 30 Assume cross compilation. <build tools dir> 31 defines the location of the build tools sources. 32 They will be compiled and placed in the output 33 directory under "cross-tools". The HAIKU_* tools 34 variables will be set accordingly. 35 --build-cross-tools-gcc4 <arch> <build tools dir> 36 Like "--build-cross-tools" just that gcc 4 will 37 be used for cross-compilation. Note, that the 38 resulting Haiku installation built with gcc 4 39 will not be binary compatible with BeOS R5. 40 <arch> specifies the target architecture, either 41 "x86", "x86_64", "ppc", "m68k", "arm" or "mipsel". 42 --cross-tools-prefix <prefix> 43 Assume cross compilation. <prefix> should be a 44 path to the directory where the cross 45 compilation tools are located, plus the platform 46 prefix, e.g. "/path/to/tools/i586-pc-haiku-". 47 This overrides the HAIKU_* tool variables. 48 --distro-compatibility <level> 49 The distribution's level of compatibility with 50 the official Haiku distribution. The generated 51 files will contain the respective trademarks 52 accordingly. 53 official -- the official Haiku distribution. 54 compatible -- a Haiku Compatible (tm) distro. 55 default -- any other distro (default value). 56 --enable-multiuser Enable experimental multiuser support. 57 --help Prints out this help. 58 --include-gpl-addons Include GPL licensed add-ons. 59 --include-patented-code Enable code that is known to implemented patented 60 ideas and techniques. If this option is not 61 specified, the resulting distribution may still 62 implement patented ideas and techniques. This 63 option only disables code that is currently known 64 to be problematic. 65 --include-sources Includes the source code of projects that require 66 either an offer of source code or a copy of the 67 patched sources. This is preferable when 68 distributing on physical mediums. 69 --include-3rdparty Include 3rdparty/ in the build system. 70 -j<n> Only relevant for --build-cross-tools and 71 --build-cross-tools-gcc4. Is passed on to the 72 make building the build tools. 73 --target=TARGET Select build target platform. 74 [default=${TARGET_PLATFORM}] 75 valid targets=r5,bone,dano,haiku 76 --update re-runs last configure invocation [must be given 77 as first option!] 78 --use-gcc-pipe Build with GCC option -pipe. Speeds up the build 79 process, but uses more memory. 80 --use-32bit Use -m32 flag on 64bit host gcc compiler. 81 --use-xattr Use Linux xattr support for BeOS attribute 82 emulation. Warning: Make sure your file system 83 supports sufficient attribute sizes (4 KB per 84 file for all attributes won't suffice). 85 86environment variables: 87 HAIKU_AR The static library archiver. Defaults to "ar". 88 HAIKU_CC The compiler. Defaults to "gcc". 89 HAIKU_LD The linker. Defaults to "ld". 90 HAIKU_OBJCOPY The objcopy to be used. Defaults to "objcopy". 91 HAIKU_RANLIB The static library indexer. Defaults to "ranlib". 92 HAIKU_YASM The yasm assembler (x86 only). 93 HAIKU_STRIP The strip command. Defaults to "strip". 94 HAIKU_CPPFLAGS The preprocessor flags. Defaults to "". 95 HAIKU_CCFLAGS The C flags. Defaults to "". 96 HAIKU_CXXFLAGS The C++ flags. Defaults to "". 97 HAIKU_LDFLAGS The linker flags. Defaults to "". 98 HAIKU_ARFLAGS The flags passed to HAIKU_AR for archiving. 99 Defaults to "cru". 100 HAIKU_UNARFLAGS The flags passed to HAIKU_AR for unarchiving. 101 Defaults to "x". 102 103Non-standard output directories: 104 By default all objects, build configuration, and other related files are 105 stored in /path/to/haiku_source/generated. To store objects in a non-default 106 location, run "../../relative/path/to/haiku_source/configure <options>" from 107 within your non-default location. "jam [ options ] targets" can then be run 108 directly inside your non-default location. Another option is to invoke "jam 109 [ options ] targets" from within haiku_source. This can be accomplished by 110 either "export HAIKU_OUTPUT_DIR=your non-default location" before invoking 111 jam or by creating a symlink of haiku_source/generated pointing to your 112 non-default location and running jam. 113 114 115EOF 116} 117 118# assertparam 119# 120# Checks whether at least one parameter is left. 121# 122assertparam() 123{ 124 if [ $2 -lt 2 ]; then 125 echo $0: \`$1\': Parameter expected. 126 exit 1 127 fi 128} 129 130# assertparams 131# 132# Checks whether at least a certain number of parameters is left. 133# 134assertparams() 135{ 136 if [ $3 -le $2 ]; then 137 echo $0: \`$1\': Not enough parameters. 138 exit 1 139 fi 140} 141 142# real_path 143# 144# returns the realpath of a symbolic link. 145# 146real_path() 147{ 148 perl -MCwd=realpath -e'print realpath($ARGV[0]), "\n"' "$1" 149} 150 151# standard_gcc_settings 152# 153# Sets the variables for a GCC platform. 154# 155standard_gcc_settings() 156{ 157 if which greadlink > /dev/null 2>&1; then 158 readlink="greadlink -e" 159 elif which realpath > /dev/null 2>&1; then 160 readlink=realpath 161 elif readlink -e / > /dev/null 2>&1; then 162 readlink="readlink -e" 163 else 164 readlink=real_path 165 fi 166 167 # PLATFORM_LINKLIBS 168 gcclib=`$HAIKU_CC -print-libgcc-file-name` 169 gccdir=`dirname ${gcclib}` 170 171 HAIKU_GCC_RAW_VERSION=`$HAIKU_CC -dumpversion` 172 HAIKU_GCC_MACHINE=`$HAIKU_CC -dumpmachine` 173 174 HAIKU_GCC_LIB_DIR=${gccdir} 175 HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a 176 HAIKU_GCC_GLUE_CODE="crtbegin.o crtend.o" 177 HAIKU_GCC_HEADERS_DIR="${gccdir}/include 178 ${gccdir}/include-fixed" 179 HAIKU_GCC_LIBGCC_OBJECTS=`$HAIKU_AR t ${HAIKU_GCC_LIBGCC} | grep -v eabi.o` 180 # Note: We filter out eabi.o. It's present in gcc's libgcc for PPC and 181 # neither needed nor wanted. 182 183 case $HAIKU_GCC_RAW_VERSION in 184 4.*) 185 # for gcc 4 we use the libstdc++ and libsupc++ that come with the 186 # compiler 187 HAIKU_STATIC_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.a` 188 HAIKU_SHARED_LIBSTDCXX=`$HAIKU_CC -print-file-name=libstdc++.so` 189 HAIKU_STATIC_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.a` 190 HAIKU_SHARED_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++.so` 191 192 # If the architecture has separate runtime libraries for the 193 # kernel, use them. 194 HAIKU_KERNEL_LIBGCC=`$HAIKU_CC -print-file-name=libgcc-kernel.a` 195 if [ $HAIKU_KERNEL_LIBGCC = libgcc-kernel.a ]; then 196 HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC 197 fi 198 HAIKU_KERNEL_LIBSUPCXX=`$HAIKU_CC -print-file-name=libsupc++-kernel.a` 199 if [ $HAIKU_KERNEL_LIBSUPCXX = libsupc++-kernel.a ]; then 200 HAIKU_KERNEL_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX 201 fi 202 203 local headers 204 if [ -d $gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION ]; then 205 headers=$gccdir/../../../../$HAIKU_GCC_MACHINE/include/c++/$HAIKU_GCC_RAW_VERSION 206 else 207 headers=$gccdir/../../../../include/c++/$HAIKU_GCC_RAW_VERSION 208 fi 209 210 HAIKU_CXX_HEADERS_DIR=$headers 211 for d in $HAIKU_GCC_MACHINE backward ext; do 212 # Note: We need the line break, otherwise the line might become 213 # too long for jam (512 bytes max). 214 HAIKU_CXX_HEADERS_DIR="$HAIKU_CXX_HEADERS_DIR 215 $headers/$d" 216 done 217 218 # Unset the HAIKU_{SHARED,STATIC}_LIB{STD,SUP}CXX variables, if the 219 # compiler didn't give us actual file names. Otherwise resolve 220 # symlinks to avoid problems when copying the libraries to the 221 # image. 222 223 if [ $HAIKU_STATIC_LIBSTDCXX = libstdc++.a ]; then 224 HAIKU_STATIC_LIBSTDCXX= 225 else 226 HAIKU_STATIC_LIBSTDCXX=`$readlink $HAIKU_STATIC_LIBSTDCXX` 227 fi 228 229 if [ $HAIKU_SHARED_LIBSTDCXX = libstdc++.so ]; then 230 HAIKU_SHARED_LIBSTDCXX= 231 else 232 HAIKU_SHARED_LIBSTDCXX=`$readlink $HAIKU_SHARED_LIBSTDCXX` 233 fi 234 235 if [ $HAIKU_STATIC_LIBSUPCXX = libsupc++.a ]; then 236 HAIKU_STATIC_LIBSUPCXX= 237 else 238 HAIKU_STATIC_LIBSUPCXX=`$readlink $HAIKU_STATIC_LIBSUPCXX` 239 fi 240 241 if [ $HAIKU_SHARED_LIBSUPCXX = libsupc++.so ]; then 242 HAIKU_SHARED_LIBSUPCXX= 243 else 244 HAIKU_SHARED_LIBSUPCXX=`$readlink $HAIKU_SHARED_LIBSUPCXX` 245 fi 246 ;; 247 2.9*) 248 # check for correct (most up-to-date) legacy compiler and complain 249 # if an older one is installed 250 if [ $HAIKU_GCC_RAW_VERSION != $haikuRequiredLegacyGCCVersion ]; then 251 echo "GCC version $haikuRequiredLegacyGCCVersion is required!"; 252 echo "Please download it from www.haiku-os.org..."; 253 exit 1; 254 fi 255 256 HAIKU_KERNEL_LIBGCC=$HAIKU_GCC_LIBGCC 257 HAIKU_KERNEL_LIBSUPCXX= 258 ;; 259 esac 260 261 case $HAIKU_GCC_MACHINE in 262 x86_64-*) 263 # Boot loader is 32-bit, need the 32-bit libs. 264 HAIKU_BOOT_LIBGCC=`$HAIKU_CC -m32 -print-libgcc-file-name` 265 HAIKU_BOOT_LIBSUPCXX=`$HAIKU_CC -m32 -print-file-name=libsupc++.a` 266 ;; 267 *) 268 HAIKU_BOOT_LIBGCC=$HAIKU_GCC_LIBGCC 269 HAIKU_BOOT_LIBSUPCXX=$HAIKU_STATIC_LIBSUPCXX 270 ;; 271 esac 272} 273 274# set_default_value 275# 276# Set the value for a variable, if no value is set yet. 277# 278set_default_value() 279{ 280 eval "$1=\${$1-$2}" 281} 282 283# get_build_tool_path 284# 285# Gets a usable absolute path of a build tool. 286# 287get_build_tool_path() 288{ 289 local var="HAIKU_$1" 290 local tool=$2 291 local path="${crossToolsPrefix}$tool" 292 293 if [ -f "$path" ]; then 294 # get absolute path 295 local oldPwd="`pwd`" 296 cd "`dirname "$path"`" 297 path="`pwd`/`basename "$path"`" 298 cd $oldPwd 299 else 300 which "$path" > /dev/null 2>&1 || { 301 echo "Build tool \"$path\" not found." >&2 302 exit 1 303 } 304 fi 305 306 eval "$var=$path" 307} 308 309# get cwd and the source directory 310currentDir=`pwd` 311cd `dirname "$0"` 312sourceDir=`pwd` 313cd "$currentDir" 314 315# backup the passed arguments 316configureArgs="$@" 317 318# internal default parameter values 319# 320platform=`uname` 321platformMachine=`uname -m` 322targetArch=x86 323crossToolsPrefix= 324buildCrossTools= 325buildCrossToolsScript="$sourceDir/build/scripts/build_fatelf_cross_tools" 326buildCrossToolsMachine= 327buildCrossToolsJobs= 328 329# exported (BuildSetup) default parameter values 330# 331HAIKU_GCC_RAW_VERSION= 332HAIKU_GCC_MACHINE=i586-pc-haiku 333HAIKU_STATIC_LIBSTDCXX= 334HAIKU_SHARED_LIBSTDCXX= 335HAIKU_STATIC_LIBSUPCXX= 336HAIKU_SHARED_LIBSUPCXX= 337HAIKU_CXX_HEADERS_DIR= 338HOST_GCC_RAW_VERSION=`gcc -dumpversion` 339HOST_GCC_MACHINE=`gcc -dumpmachine` 340HAIKU_INCLUDE_GPL_ADDONS=0 341HAIKU_INCLUDE_PATENTED_CODE=0 342HAIKU_INCLUDE_SOURCES=0 343HAIKU_INCLUDE_3RDPARTY=0 344HAIKU_ENABLE_MULTIUSER=0 345HAIKU_DISTRO_COMPATIBILITY=default 346TARGET_PLATFORM=haiku 347HAIKU_USE_GCC_PIPE=0 348HAIKU_HOST_USE_32BIT=0 349HAIKU_HOST_USE_XATTR=0 350HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR= 351HAIKU_ADD_ALTERNATIVE_GCC_LIBS=0 352HOST_GCC_LD=`gcc -print-prog-name=ld` 353HOST_GCC_OBJCOPY=`gcc -print-prog-name=objcopy` 354SFDISK_BINARY=sfdisk 355HOST_SFDISK=$SFDISK_BINARY 356 357haikuRequiredLegacyGCCVersion="2.95.3-haiku-121101" 358export haikuRequiredLegacyGCCVersion 359 # version of legacy gcc required to build haiku 360 361set_default_value HAIKU_AR ar 362set_default_value HAIKU_CC gcc 363set_default_value HAIKU_LD ld 364set_default_value HAIKU_OBJCOPY objcopy 365set_default_value HAIKU_RANLIB ranlib 366set_default_value HAIKU_ELFEDIT elfedit 367set_default_value HAIKU_YASM yasm 368set_default_value HAIKU_STRIP strip 369set_default_value HAIKU_CPPFLAGS "" 370set_default_value HAIKU_CCFLAGS "" 371set_default_value HAIKU_CXXFLAGS "" 372set_default_value HAIKU_LDFLAGS "" 373set_default_value HAIKU_ARFLAGS cru 374set_default_value HAIKU_UNARFLAGS x 375 376# determine output directory 377if [ "$currentDir" = "$sourceDir" ]; then 378 outputDir=$currentDir/generated 379else 380 outputDir=$currentDir 381fi 382buildOutputDir="$outputDir/build" 383HAIKU_BUILD_ATTRIBUTES_DIR="$outputDir/attributes" 384buildConfigFile="$buildOutputDir/BuildConfig" 385 386# check for update request 387if [ "$1" = "--update" ]; then 388 if ! [ -e "$buildConfigFile" ]; then 389 echo $0 --update: \'$buildConfigFile\' not found - updating not possible. 390 exit 1 391 fi 392 if ! type perl >/dev/null 2>&1; then 393 echo $0 --update: \'perl\' not found - updating not possible. 394 exit 1 395 fi 396 # convert BuildConfig from jam format to shell format and evaluate it 397 shellConfigFile="${buildConfigFile}.shell" 398 perl "$sourceDir/build/scripts/convert_build_config_to_shell_format.pl" \ 399 <"$buildConfigFile" >"$shellConfigFile" 400 . "$shellConfigFile" 401 rm "$shellConfigFile" 402 shift 403fi 404 405# parse parameters 406# 407while [ $# -gt 0 ] ; do 408 case "$1" in 409 --alternative-gcc-output-dir) 410 assertparam "$1" $# 411 cd $2 || exit 1 412 HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR=`pwd` 413 HAIKU_ADD_ALTERNATIVE_GCC_LIBS=1 414 cd $currentDir 415 shift 2 416 ;; 417 --build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;; 418 --build-cross-tools-gcc4) 419 assertparams "$1" 2 $# 420 buildCrossTools=$3 421 case "$2" in 422 x86) HAIKU_GCC_MACHINE=i586-pc-haiku;; 423 x86_64) HAIKU_GCC_MACHINE=x86_64-unknown-haiku; targetArch=x86_64;; 424 ppc) HAIKU_GCC_MACHINE=powerpc-apple-haiku; targetArch=ppc;; 425 m68k) HAIKU_GCC_MACHINE=m68k-unknown-haiku; targetArch=m68k;; 426 arm) HAIKU_GCC_MACHINE=arm-unknown-haiku; targetArch=arm;; 427 mipsel) HAIKU_GCC_MACHINE=mipsel-unknown-haiku; targetArch=mips;; 428 *) echo "Unsupported target architecture: $2" 429 exit 1;; 430 esac 431 buildCrossToolsMachine=$HAIKU_GCC_MACHINE 432 shift 3 433 ;; 434 --cross-tools-prefix) 435 assertparam "$1" $# 436 crossToolsPrefix=$2 437 shift 2 438 ;; 439 --distro-compatibility) 440 assertparam "$1" $# 441 HAIKU_DISTRO_COMPATIBILITY=$2 442 case "$HAIKU_DISTRO_COMPATIBILITY" in 443 official) ;; 444 compatible) ;; 445 default) ;; 446 *) echo "Invalid distro compatibility" \ 447 "level: $HAIKU_DISTRO_COMPATIBILITY" 448 exit 1;; 449 esac 450 shift 2 451 ;; 452 --enable-multiuser) HAIKU_ENABLE_MULTIUSER=1; shift 1;; 453 --help | -h) usage; exit 0;; 454 --include-gpl-addons) HAIKU_INCLUDE_GPL_ADDONS=1; shift 1;; 455 --include-patented-code) HAIKU_INCLUDE_PATENTED_CODE=1; shift 1;; 456 --include-sources) HAIKU_INCLUDE_SOURCES=1; shift 1;; 457 --include-3rdparty) HAIKU_INCLUDE_3RDPARTY=1; shift 1;; 458 -j*) buildCrossToolsJobs="$1"; shift 1;; 459 --target=*) TARGET_PLATFORM=`echo $1 | cut -d'=' -f2-`; shift 1;; 460 --use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;; 461 --use-32bit) HAIKU_HOST_USE_32BIT=1; shift 1;; 462 --use-xattr) HAIKU_HOST_USE_XATTR=1; shift 1;; 463 *) echo Invalid argument: \`$1\'; exit 1;; 464 esac 465done 466 467# detect the build platform 468case "${platform}" in 469 BeOS) revision=`uname -r` 470 case "$revision" in 471 6.*) HOST_PLATFORM=dano ;; 472 5.1) HOST_PLATFORM=dano ;; 473 5.0.4) HOST_PLATFORM=bone ;; 474 5.0*) HOST_PLATFORM=r5 ;; 475 *) echo Unknown BeOS version: $revision 476 exit 1 ;; 477 esac 478 ;; 479 Darwin) HOST_PLATFORM=darwin ;; 480 FreeBSD) HOST_PLATFORM=freebsd 481 SFDISK_BINARY=sfdisk-linux 482 if [ "$HAIKU_HOST_USE_32BIT" = 1 ] ; then 483 echo Unsupported platform: FreeBSD ${platformMachine} 484 exit 1 485 fi ;; 486 Haiku) HOST_PLATFORM=haiku_host ;; 487 Linux) HOST_PLATFORM=linux ;; 488 OpenBSD) HOST_PLATFORM=openbsd ;; 489 SunOS) HOST_PLATFORM=sunos ;; 490 CYGWIN_NT-*) HOST_PLATFORM=cygwin ;; 491 *) echo Unsupported platform: ${platform} 492 exit 1 ;; 493esac 494 495# check common locations for sfdisk 496for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do 497 if [ -e ${sfdiskDir}/${SFDISK_BINARY} ]; then 498 HOST_SFDISK=${sfdiskDir}/${SFDISK_BINARY} 499 fi 500done 501 502# check for case-sensitive filesystem 503mkdir haikuCaseTest 2>/dev/null 504mkdir haikucasetest 2>/dev/null 505caseInsensitive=$? 506rmdir haikuCaseTest haikucasetest 2>/dev/null 507if [ $caseInsensitive != 0 ]; then 508 echo "You need a case-sensitive file-system to build Haiku." 509 if [ $HOST_PLATFORM = "darwin" ]; then 510 echo "You can create a case-sensitive disk image using Disk Utility and use" 511 echo "it to store the Haiku sources on." 512 fi 513 exit 1 514fi 515 516# create output directory 517mkdir -p "$buildOutputDir" || exit 1 518 519# build cross tools from sources 520if [ -n "$buildCrossTools" ]; then 521 "$buildCrossToolsScript" --prefix "$outputDir/cross-tools" \ 522 --objroot "$outputDir/cross-tools-obj" --buildtools "${buildCrossTools}" \ 523 --haiku "${sourceDir}" --targets "${HAIKU_GCC_MACHINE}" \ 524 $buildCrossToolsJobs build || exit 1 525 crossToolsPrefix="$outputDir/cross-tools/bin/" 526fi 527 528# cross tools 529if [ -n "$crossToolsPrefix" ]; then 530 get_build_tool_path AR ar 531 get_build_tool_path CC gcc 532 get_build_tool_path LD ld 533 get_build_tool_path OBJCOPY objcopy 534 get_build_tool_path RANLIB ranlib 535 get_build_tool_path STRIP strip 536fi 537 538# prepare gcc settings 539standard_gcc_settings 540 541# cross tools for gcc4 builds 542if [ -n "$crossToolsPrefix" ]; then 543 case $HAIKU_GCC_RAW_VERSION in 544 4.*) 545 get_build_tool_path ELFEDIT elfedit 546 ;; 547 esac 548fi 549 550# check whether the Haiku compiler really targets Haiku or BeOS 551case "$HAIKU_GCC_MACHINE" in 552 *-*-haiku) ;; 553 *-*-beos) ;; 554 *) echo The compiler specified as Haiku target compiler is not a valid \ 555 Haiku cross-compiler. Please see ReadMe.cross-compile. >&2 556 echo compiler: $HAIKU_CC 557 echo compiler is configured for target: $HAIKU_GCC_MACHINE 558 exit 1 ;; 559esac 560 561# Generate BuildConfig 562cat << EOF > "$buildConfigFile" 563# BuildConfig 564# Note: This file has been automatically generated by configure with the 565# following arguments: 566# ${configureArgs} 567 568TARGET_PLATFORM ?= "${TARGET_PLATFORM}" ; 569HOST_PLATFORM ?= "${HOST_PLATFORM}" ; 570 571HAIKU_INCLUDE_GPL_ADDONS ?= "${HAIKU_INCLUDE_GPL_ADDONS}" ; 572HAIKU_INCLUDE_PATENTED_CODE ?= "${HAIKU_INCLUDE_PATENTED_CODE}" ; 573HAIKU_INCLUDE_SOURCES ?= "${HAIKU_INCLUDE_SOURCES}" ; 574HAIKU_INCLUDE_3RDPARTY ?= "${HAIKU_INCLUDE_3RDPARTY}" ; 575HAIKU_ENABLE_MULTIUSER ?= "${HAIKU_ENABLE_MULTIUSER}" ; 576HAIKU_DISTRO_COMPATIBILITY ?= "${HAIKU_DISTRO_COMPATIBILITY}" ; 577HAIKU_USE_GCC_PIPE ?= "${HAIKU_USE_GCC_PIPE}" ; 578HAIKU_HOST_USE_32BIT ?= "${HAIKU_HOST_USE_32BIT}" ; 579HAIKU_HOST_USE_XATTR ?= "${HAIKU_HOST_USE_XATTR}" ; 580HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR ?= ${HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR} ; 581HAIKU_ADD_ALTERNATIVE_GCC_LIBS ?= ${HAIKU_ADD_ALTERNATIVE_GCC_LIBS} ; 582 583HAIKU_GCC_RAW_VERSION ?= ${HAIKU_GCC_RAW_VERSION} ; 584HAIKU_GCC_MACHINE ?= ${HAIKU_GCC_MACHINE} ; 585HAIKU_GCC_LIB_DIR ?= ${HAIKU_GCC_LIB_DIR} ; 586HAIKU_GCC_HEADERS_DIR ?= ${HAIKU_GCC_HEADERS_DIR} ; 587HAIKU_GCC_LIBGCC ?= ${HAIKU_GCC_LIBGCC} ; 588 589HAIKU_STATIC_LIBSTDC++ ?= ${HAIKU_STATIC_LIBSTDCXX} ; 590HAIKU_SHARED_LIBSTDC++ ?= ${HAIKU_SHARED_LIBSTDCXX} ; 591HAIKU_STATIC_LIBSUPC++ ?= ${HAIKU_STATIC_LIBSUPCXX} ; 592HAIKU_SHARED_LIBSUPC++ ?= ${HAIKU_SHARED_LIBSUPCXX} ; 593HAIKU_C++_HEADERS_DIR ?= ${HAIKU_CXX_HEADERS_DIR} ; 594 595HAIKU_KERNEL_LIBGCC ?= ${HAIKU_KERNEL_LIBGCC} ; 596HAIKU_KERNEL_LIBSUPC++ ?= ${HAIKU_KERNEL_LIBSUPCXX} ; 597HAIKU_BOOT_LIBGCC ?= ${HAIKU_BOOT_LIBGCC} ; 598HAIKU_BOOT_LIBSUPC++ ?= ${HAIKU_BOOT_LIBSUPCXX} ; 599 600HAIKU_BUILD_ATTRIBUTES_DIR ?= ${HAIKU_BUILD_ATTRIBUTES_DIR} ; 601 602HAIKU_AR ?= ${HAIKU_AR} ; 603HAIKU_CC ?= ${HAIKU_CC} ; 604HAIKU_LD ?= ${HAIKU_LD} ; 605HAIKU_OBJCOPY ?= ${HAIKU_OBJCOPY} ; 606HAIKU_RANLIB ?= ${HAIKU_RANLIB} ; 607HAIKU_ELFEDIT ?= ${HAIKU_ELFEDIT} ; 608HAIKU_YASM ?= ${HAIKU_YASM} ; 609HAIKU_STRIP ?= ${HAIKU_STRIP} ; 610HAIKU_CPPFLAGS ?= ${HAIKU_CPPFLAGS} ; 611HAIKU_CCFLAGS ?= ${HAIKU_CCFLAGS} ; 612HAIKU_C++FLAGS ?= ${HAIKU_CXXFLAGS} ; 613HAIKU_LDFLAGS ?= ${HAIKU_LDFLAGS} ; 614HAIKU_ARFLAGS ?= ${HAIKU_ARFLAGS} ; 615HAIKU_UNARFLAGS ?= ${HAIKU_UNARFLAGS} ; 616 617HOST_GCC_RAW_VERSION ?= ${HOST_GCC_RAW_VERSION} ; 618HOST_GCC_MACHINE ?= ${HOST_GCC_MACHINE} ; 619HOST_LD ?= ${HOST_GCC_LD} ; 620HOST_OBJCOPY ?= ${HOST_GCC_OBJCOPY} ; 621HOST_SFDISK ?= ${HOST_SFDISK} ; 622 623EOF 624 625# Libgcc.a objects 626 627cat << EOF > "$buildOutputDir/libgccObjects" 628# libgcc.a objects to be linked against libroot.so 629# Note: This file has been automatically generated by configure. 630 631HAIKU_GCC_LIBGCC_OBJECTS ?= ${HAIKU_GCC_LIBGCC_OBJECTS} ; 632EOF 633 634# Generate a boot strap Jamfile in the output directory. 635 636cat << EOF > $outputDir/Jamfile 637# automatically generated Jamfile 638 639HAIKU_TOP = ${sourceDir} ; 640HAIKU_OUTPUT_DIR = ${outputDir} ; 641 642include [ FDirName \$(HAIKU_TOP) Jamfile ] ; 643 644EOF 645