From eccc7665b5e9b71ddd90cffcd728c348e56bb8ea Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 4 Feb 2007 14:03:21 +0000 Subject: [PATCH] Added configure option --use-gcc-pipe to enable building with the gcc -pipe option. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20066 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/BuildSetup | 15 +++++++++------ configure | 32 +++++++++++++++++++------------- 2 files changed, 28 insertions(+), 19 deletions(-) diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup index e7b2bd4aa8..83e400e36b 100644 --- a/build/jam/BuildSetup +++ b/build/jam/BuildSetup @@ -49,18 +49,21 @@ HAIKU_DANO_COMPATIBLE_PLATFORMS = haiku dano ; # haiku target platform settings -#HAIKU_BASE_CCFLAGS ?= -pipe ; +# enable GCC -pipe option, if requested +if $(HAIKU_USE_GCC_PIPE) = 1 { + HAIKU_GCC_BASE_FLAGS = -pipe ; +} # initial state for flags etc. HAIKU_C++ ?= $(HAIKU_CC) ; HAIKU_LINK = $(HAIKU_CC) ; -HAIKU_LINKFLAGS = $(HAIKU_BASE_CCFLAGS) ; +HAIKU_LINKFLAGS = $(HAIKU_GCC_BASE_FLAGS) ; HAIKU_HDRS = [ FStandardHeaders ] ; -HAIKU_CCFLAGS = $(HAIKU_BASE_CCFLAGS) -nostdinc ; -HAIKU_C++FLAGS = $(HAIKU_BASE_CCFLAGS) -nostdinc ; -HAIKU_KERNEL_CCFLAGS = $(HAIKU_BASE_CCFLAGS) ; -HAIKU_KERNEL_C++FLAGS = $(HAIKU_BASE_CCFLAGS) ; +HAIKU_CCFLAGS = $(HAIKU_GCC_BASE_FLAGS) -nostdinc ; +HAIKU_C++FLAGS = $(HAIKU_GCC_BASE_FLAGS) -nostdinc ; +HAIKU_KERNEL_CCFLAGS = $(HAIKU_GCC_BASE_FLAGS) ; +HAIKU_KERNEL_C++FLAGS = $(HAIKU_GCC_BASE_FLAGS) ; HAIKU_DEFINES = __HAIKU__ ; # analyze the gcc machine spec to determine HAIKU_CPU diff --git a/configure b/configure index 24718d1aad..7ce113f6ff 100755 --- a/configure +++ b/configure @@ -14,12 +14,6 @@ Usage: $0 options: --bochs-debug Enables bochs serial debug emulation (activated via kernel settings file). - --cross-tools-prefix - Assume cross compilation. should be a - path to the directory where the cross - compilation tools are located, plus the platform - prefix, e.g. "/path/to/tools/i586-pc-beos-". - This overrides the HAIKU_* tool variables. --build-cross-tools Assume cross compilation. defines the location of the build tools sources. @@ -33,10 +27,18 @@ options: will not be binary compatible with BeOS R5. specifies the target architecture, either "x86" or "ppc". + --cross-tools-prefix + Assume cross compilation. should be a + path to the directory where the cross + compilation tools are located, plus the platform + prefix, e.g. "/path/to/tools/i586-pc-beos-". + This overrides the HAIKU_* tool variables. + --help Prints out this help. + --include-gpl-addons Include GPL licensed add-ons. --target=TARGET Select build target platform. [default=${target}] valid targets=r5,bone,dano,haiku - --include-gpl-addons Include GPL licensed add-ons. - --help Prints out this help. + --use-gcc-pipe Build with GCC option -pipe. Speeds up the build + build process, but uses more memory. environment variables: HAIKU_AR The static library archiver. Defaults to "ar". @@ -204,6 +206,7 @@ hostGCCVersion=`gcc -dumpversion` bochs_debug=0 include_gpl_addons=0 target=haiku +use_gcc_pipe=0 crossToolsPrefix= buildCrossTools= buildCrossToolsScript="$sourceDir/build/scripts/build_cross_tools" @@ -228,10 +231,7 @@ set_default_value HAIKU_UNARFLAGS x # while [ $# -gt 0 ] ; do case "$1" in - --include-gpl-addons) include_gpl_addons=1; shift 1;; --bochs-debug) bochs_debug=1; shift 1;; - --target=*) target=`echo $1 | cut -d'=' -f2-`; shift 1;; - --cross-tools-prefix) assertparam "$1" $#; crossToolsPrefix=$2; shift 2;; --build-cross-tools) assertparam "$1" $#; buildCrossTools=$2; shift 2;; --build-cross-tools-gcc4) assertparams "$1" 2 $#; buildCrossTools=$3; buildCrossToolsScript="${buildCrossToolsScript}_gcc4"; @@ -243,7 +243,11 @@ while [ $# -gt 0 ] ; do esac buildCrossToolsMachine=$haikuGCCMachine shift 3;; + --cross-tools-prefix) assertparam "$1" $#; crossToolsPrefix=$2; shift 2;; --help | -h) usage; exit 0;; + --include-gpl-addons) include_gpl_addons=1; shift 1;; + --target=*) target=`echo $1 | cut -d'=' -f2-`; shift 1;; + --use-gcc-pipe) use_gcc_pipe=1; shift 1;; *) echo Invalid argument: \`$1\'; exit 1;; esac done @@ -301,11 +305,13 @@ cat << EOF > "$buildOutputDir/BuildConfig" # BuildConfig # Note: This file has been automatically generated by configure. -BOCHS_DEBUG_HACK ?= "${bochs_debug}" ; -INCLUDE_GPL_ADDONS ?= "${include_gpl_addons}" ; TARGET_PLATFORM ?= "${target}" ; HOST_PLATFORM ?= "${buildPlatform}" ; +BOCHS_DEBUG_HACK ?= "${bochs_debug}" ; +INCLUDE_GPL_ADDONS ?= "${include_gpl_addons}" ; +HAIKU_USE_GCC_PIPE ?= "${use_gcc_pipe}" ; + HAIKU_GCC_RAW_VERSION ?= ${haikuGCCVersion} ; HAIKU_GCC_MACHINE ?= ${haikuGCCMachine} ; HAIKU_GCC_LIB_DIR ?= ${HAIKU_GCC_LIB_DIR} ;