Added a configure option to activate Graphite compilations flags

* check if GCC actually supports Graphite flags when the option
  --use-gcc-graphite is used
This commit is contained in:
Jerome Duval
2013-04-06 13:58:46 +02:00
parent f18ed048c2
commit 748c10f222
2 changed files with 16 additions and 0 deletions
+6
View File
@@ -145,6 +145,12 @@ if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_GCC_BASE_FLAGS += -Wno-array-bounds ;
}
# activating graphite optimizations
if $(HAIKU_USE_GCC_GRAPHITE) = 1 {
HAIKU_GCC_BASE_FLAGS += -floop-interchange -ftree-loop-distribution
-floop-strip-mine -floop-block ;
}
if $(HOST_GCC_VERSION[1]) >= 3 {
HOST_GCC_BASE_FLAGS += -fno-strict-aliasing -fno-tree-vrp ;
}
Vendored
+10
View File
@@ -170,6 +170,13 @@ standard_gcc_settings()
HAIKU_GCC_RAW_VERSION=`$HAIKU_CC -dumpversion`
HAIKU_GCC_MACHINE=`$HAIKU_CC -dumpmachine`
if [ "$HAIKU_USE_GCC_GRAPHITE" != 0 ]; then
UNUSED=`echo "int main() {}" | $HAIKU_CC -xc -c -floop-block - 2>&1`
if [ $? != 0 ]; then
echo "GCC Graphite loop optimizations cannot be used"
HAIKU_USE_GCC_GRAPHITE=0
fi
fi
HAIKU_GCC_LIB_DIR=${gccdir}
HAIKU_GCC_LIBGCC=${gccdir}/libgcc.a
@@ -345,6 +352,7 @@ HAIKU_ENABLE_MULTIUSER=0
HAIKU_DISTRO_COMPATIBILITY=default
TARGET_PLATFORM=haiku
HAIKU_USE_GCC_PIPE=0
HAIKU_USE_GCC_GRAPHITE=0
HAIKU_HOST_USE_32BIT=0
HAIKU_HOST_USE_XATTR=0
HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR=
@@ -459,6 +467,7 @@ while [ $# -gt 0 ] ; do
-j*) buildCrossToolsJobs="$1"; shift 1;;
--target=*) TARGET_PLATFORM=`echo $1 | cut -d'=' -f2-`; shift 1;;
--use-gcc-pipe) HAIKU_USE_GCC_PIPE=1; shift 1;;
--use-gcc-graphite) HAIKU_USE_GCC_GRAPHITE=1; shift 1;;
--use-32bit) HAIKU_HOST_USE_32BIT=1; shift 1;;
--use-xattr) HAIKU_HOST_USE_XATTR=1; shift 1;;
*) echo Invalid argument: \`$1\'; exit 1;;
@@ -574,6 +583,7 @@ HAIKU_INCLUDE_3RDPARTY ?= "${HAIKU_INCLUDE_3RDPARTY}" ;
HAIKU_ENABLE_MULTIUSER ?= "${HAIKU_ENABLE_MULTIUSER}" ;
HAIKU_DISTRO_COMPATIBILITY ?= "${HAIKU_DISTRO_COMPATIBILITY}" ;
HAIKU_USE_GCC_PIPE ?= "${HAIKU_USE_GCC_PIPE}" ;
HAIKU_USE_GCC_GRAPHITE ?= "${HAIKU_USE_GCC_GRAPHITE}" ;
HAIKU_HOST_USE_32BIT ?= "${HAIKU_HOST_USE_32BIT}" ;
HAIKU_HOST_USE_XATTR ?= "${HAIKU_HOST_USE_XATTR}" ;
HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR ?= ${HAIKU_ALTERNATIVE_GCC_OUTPUT_DIR} ;