Add a config option for gcc tls support, rather than disabling it blindly
authorAustin Foxley <austinf@cetoncorp.com>
Sun, 20 Sep 2009 23:33:38 +0000 (16:33 -0700)
committerPeter Korsgaard <jacmet@sunsite.dk>
Wed, 23 Sep 2009 07:34:08 +0000 (09:34 +0200)
Defaulted to yes, but blocked it from gcc 4.4.x since the disable was
originally added because of problems with its c++ support reportedly.

Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
toolchain/gcc/Config.in
toolchain/gcc/gcc-uclibc-4.x.mk

index 279e10152b028ffcb34f3478965c6ee4258a220e..db7e32e7997f5a98b09cf00cc8f45fdba34d82c2 100644 (file)
@@ -175,3 +175,10 @@ config BR2_GCC_SHARED_LIBGCC
        help
          Build/install a shared libgcc library
 
+config BR2_GCC_ENABLE_TLS
+       bool "Enable compiler tls support"
+       default y
+       depends on !BR2_GCC_VERSION_4_4_X
+       help
+         Enable the compiler to generate code for accessing
+         thread local storage variables
index 98295e307a607825c29a701b439a513b0b929bcc..49e9a700f4c8a2f27b936070e48e5a233da4e4b4 100644 (file)
@@ -137,6 +137,12 @@ else
 GCC_SHARED_LIBGCC:=--disable-shared
 endif
 
+ifeq ($(BR2_GCC_ENABLE_TLS),y)
+GCC_TLS:=--enable-tls
+else
+GCC_TLS:=--disable-tls
+endif
+
 ifeq ($(BR2_KERNEL_HURD),y)
 EXTRA_GCC1_CONFIG_OPTIONS+=--without-headers
 endif
@@ -219,7 +225,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
                --with-gnu-ld \
                --disable-shared \
                --disable-libssp \
-               --disable-tls \
+               $(GCC_TLS) \
                $(GCC_WITH_HOST_GMP) \
                $(GCC_WITH_HOST_MPFR) \
                $(DISABLE_NLS) \
@@ -295,7 +301,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
                --enable-target-optspace \
                --with-gnu-ld \
                --disable-libssp \
-               --disable-tls \
+               $(GCC_TLS) \
                $(GCC_SHARED_LIBGCC) \
                $(GCC_WITH_HOST_GMP) \
                $(GCC_WITH_HOST_MPFR) \
@@ -422,7 +428,7 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_BUILD_DIR3)/.prepared
                --disable-__cxa_atexit \
                --with-gnu-ld \
                --disable-libssp \
-               --disable-tls \
+               $(GCC_TLS) \
                $(GCC_SHARED_LIBGCC) \
                $(GCC_WITH_TARGET_GMP) \
                $(GCC_WITH_TARGET_MPFR) \