aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorAlexander Ivchenko <alexander.ivchenko@intel.com>2014-12-15 16:58:26 +0300
committerAlexander Ivchenko <alexander.ivchenko@intel.com>2014-12-16 00:28:38 +0300
commit5db5ac7764a633d1e9a4e45b03536128c32ebffe (patch)
treeee01f8ee6a519adf21e54704a462f7fb8a2bd935 /build
parented00d8ae300ddc5ce7c6ddc65d6242eb205d47ad (diff)
downloadndk-5db5ac7764a633d1e9a4e45b03536128c32ebffe.tar.gz
Enable indirect functions when building gcc.
This way we will not need any local patches for ifuncs when pulling gcc-5.x. Change-Id: I98bed3a405c8e72e734285e170801c05c42fc416 Signed-off-by: Alexander Ivchenko <alexander.ivchenko@intel.com>
Diffstat (limited to 'build')
-rwxr-xr-xbuild/tools/build-gcc.sh6
-rwxr-xr-xbuild/tools/build-host-gcc.sh2
2 files changed, 7 insertions, 1 deletions
diff --git a/build/tools/build-gcc.sh b/build/tools/build-gcc.sh
index 1339e8b81..ce199f092 100755
--- a/build/tools/build-gcc.sh
+++ b/build/tools/build-gcc.sh
@@ -312,6 +312,12 @@ case "$TOOLCHAIN" in
*) EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --enable-libgomp" ;;
esac
+# Enable indirect functions in the compilers that support it (4.6 and above)
+case "$TOOLCHAIN" in
+ *-4.4.3) ;;
+ *) EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --enable-gnu-indirect-function" ;;
+esac
+
# Disable libcilkrts which needs C++ for now, because libstdlibc++ in NDK is built separately...
case "$TOOLCHAIN" in
x86*-4.9) EXTRA_CONFIG_FLAGS=$EXTRA_CONFIG_FLAGS" --disable-libcilkrts"
diff --git a/build/tools/build-host-gcc.sh b/build/tools/build-host-gcc.sh
index 810b12c7a..41ebf340f 100755
--- a/build/tools/build-host-gcc.sh
+++ b/build/tools/build-host-gcc.sh
@@ -1325,7 +1325,7 @@ build_host_gcc_core ()
esac
ARGS=$ARGS" --with-gnu-as --with-gnu-ld"
- ARGS=$ARGS" --enable-threads --disable-libssp --disable-libmudflap"
+ ARGS=$ARGS" --enable-threads --disable-libssp --disable-libmudflap --disable-libcilkrts --enable-gnu-indirect-function"
ARGS=$ARGS" --disable-libstdc__-v3 --disable-sjlj-exceptions"
ARGS=$ARGS" --disable-tls"
ARGS=$ARGS" --disable-libquadmath --disable-libitm --disable-bootstrap"