summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/cc/gcc.in.219
-rw-r--r--scripts/build/cc/100-gcc.sh12
2 files changed, 31 insertions, 0 deletions
diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
index 638bfe9..b4c5528 100644
--- a/config/cc/gcc.in.2
+++ b/config/cc/gcc.in.2
@@ -90,6 +90,25 @@ config CC_GCC_SYSTEM_ZLIB
If unsure, say 'n'.
+config CC_GCC_CONFIG_TLS
+ tristate
+ prompt "Configure TLS (Thread Local Storage)"
+ default m
+ help
+ Specify that the target supports TLS (Thread Local Storage). Usually
+ configure can correctly determine if TLS is supported. In cases where
+ it guesses incorrectly, TLS can be explicitly enabled or disabled.
+ This can happen if the assembler supports TLS but the C library does
+ not, or if the assumptions made by the configure test are incorrect.
+
+ Option | TLS use | Associated ./configure switch
+ ---------+--------------------+--------------------------------
+ Y | forcibly used | --enable-tls
+ M | auto | (none, ./configure decides)
+ N | forcibly not used | --disable-tls
+
+ If unsure, say 'M'.
+
#-----------------------------------------------------------------------------
# Optimisation features
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
index 48f5122..81ef523 100644
--- a/scripts/build/cc/100-gcc.sh
+++ b/scripts/build/cc/100-gcc.sh
@@ -555,6 +555,12 @@ do_gcc_core_backend() {
extra_config+=("--with-system-zlib")
fi
+ case "${CT_CC_GCC_CONFIG_TLS}" in
+ y) extra_config+=("--enable-tls");;
+ m) ;;
+ "") extra_config+=("--disable-tls");;
+ esac
+
# Some versions of gcc have a defective --enable-multilib.
# Since that's the default, only pass --disable-multilib. For multilib,
# also enable multiarch. Without explicit --enable-multiarch, pass-1
@@ -1077,6 +1083,12 @@ do_gcc_backend() {
extra_config+=("--with-system-zlib")
fi
+ case "${CT_CC_GCC_CONFIG_TLS}" in
+ y) extra_config+=("--enable-tls");;
+ m) ;;
+ "") extra_config+=("--disable-tls");;
+ esac
+
# Some versions of gcc have a defective --enable-multilib.
# Since that's the default, only pass --disable-multilib.
if [ "${CT_MULTILIB}" != "y" ]; then