summaryrefslogtreecommitdiff
path: root/scripts/build/cc
diff options
context:
space:
mode:
authorArnaud Lacombe <lacombar@gmail.com>2010-04-07 16:35:22 (GMT)
committerArnaud Lacombe <lacombar@gmail.com>2010-04-07 16:35:22 (GMT)
commit93042972a8cf2d9e8ce6ef12e4e6976cc5bedec0 (patch)
tree8147a98167ed83bb0e741984a82323ea666c75d0 /scripts/build/cc
parent2059d43d860c34035ee40479cf77da9cc8b59878 (diff)
cc/gcc: fix thread-less final gcc build
If threads are disabled in libc, we don't want to enable them in the final compiler. Doing so pass the configure stage, but fails latter on a missing <pthread.h>. Moreover, we don't want to build libgomp if threads are disabled; its configure script would fails anyway. Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Diffstat (limited to 'scripts/build/cc')
-rw-r--r--scripts/build/cc/gcc.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 7ebfff6..f4cf7cb 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -313,6 +313,15 @@ do_cc() {
extra_config+=("--with-mpc=${CT_PREFIX_DIR}")
fi
+ if [ "${CT_THREADS}" = "none" ]; then
+ extra_config+=("--disable-threads")
+ if [ "${CT_CC_GCC_4_2_or_later}" = y ]; then
+ extra_config+=("--disable-libgomp")
+ fi
+ else
+ extra_config+=("--enable-threads=posix")
+ fi
+
CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'"
# --enable-symvers=gnu really only needed for sh4 to work around a
@@ -334,7 +343,6 @@ do_cc() {
"${extra_config[@]}" \
--with-local-prefix="${CT_SYSROOT_DIR}" \
--disable-nls \
- --enable-threads=posix \
--enable-symvers=gnu \
--enable-c99 \
--enable-long-long \