kernel: Allow non-zephyr toolchains to advertise TLS support

Use a new environment variable,
ZEPHYR_TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE, to set the value for
TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE instead of setting it to 'n' for
all non-Zephyr toolchains. In particular, the Debian arm-none-eabi
toolchain has TLS support and with this option, can be used to build
Zephyr with thread local variables.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2022-05-14 22:37:00 -07:00 committed by Carles Cufí
commit 275b40ef25

View file

@ -922,7 +922,7 @@ config TICKLESS_KERNEL
config TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE config TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE
bool bool
default y if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr" default y if "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr" || "$(ZEPHYR_TOOLCHAIN_SUPPORTS_THREAD_LOCAL_STORAGE)" = "y"
help help
Hidden option to signal that toolchain supports generating code Hidden option to signal that toolchain supports generating code
with thread local storage. with thread local storage.