Go to file
Thomas Petazzoni 1bd02bc230 gcc: remove BR2_GCC_ENABLE_TLS option
The current BR2_GCC_ENABLE_TLS can cause users to make incorrect
choices, and is not very useful. This options allows to decide whether
we pass --enable-tls or --disable-tls to gcc, to enable or disable
support for Thread Local Storage.

Its behavior is:

 - The option is default to "y" but only exists if we're using
   uClibc/NPTL or glibc.

 - When we're using uClibc, the option can be disabled.

So, in practice, this means that currently:

 - TLS support is always on for glibc

 - TLS support is on by default for uClibc/NPTL, but can be disabled in
   the configuration. This is in fact bad and causes the build failure
   reported in bug #7424 (this bug is still reproducible on master)

 - TLS support is always disabled for uClibc/no-thread and
   uClibc/linuxthreads.

 - TLS support is always disabled for musl. This does not cause any
   build failure, but musl can use TLS support, and therefore be more
   efficient. According to
   http://www.openwall.com/lists/musl/2012/10/04/1, "Note that if you've
   been building gcc with --disable-tls, __thread was already working
   but gets emulated (very poorly; it's slow and will abort() if it runs
   out of memory) through libgcc.".

So, this commit completely removes the BR2_GCC_ENABLE_TLS and instead
makes the right choice inside gcc.mk directly:

 - TLS support enabled for glibc, musl and uClibc/NPTL

 - TLS support in other cases, i.e uClibc/no-thread and
   uClibc/linuxthreads.

We have intentionally *not* added the option to
Config.in.legacy. Indeed, the new behavior is *exactly* the same as the
older behavior, with the exception of:

 - People can no longer disable TLS support in uClibc/NPTL, which was
   anyway causing a build failure and therefore was not used.

 - TLS support is now enabled on musl, but people using musl already had
   BR2_GCC_ENABLE_TLS not set, so they wouldn't get the legacy warning.

Fixes bug #7424.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2016-08-31 21:45:36 +02:00
arch
board
boot
configs
docs docs/manual: prepare-kconfig can be used as a dependency of documents 2016-08-27 21:57:24 +02:00
fs
linux Revert "Added local directory as source of kernel code" 2016-08-28 23:55:30 +02:00
package gcc: remove BR2_GCC_ENABLE_TLS option 2016-08-31 21:45:36 +02:00
support core: move pkg-utils.mk to support/ 2016-08-27 16:03:35 +02:00
system
toolchain
.defconfig
.gitignore
CHANGES
Config.in core: introduce a generated kconfig snippet 2016-08-27 21:44:57 +02:00
Config.in.legacy Revert "Added local directory as source of kernel code" 2016-08-28 23:55:30 +02:00
COPYING
Makefile core: introduce a generated kconfig snippet 2016-08-27 21:44:57 +02:00
Makefile.legacy
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches