From 23b6aa9f1937afc6f7658f30081b1a54a2e74024 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 2 Nov 2022 12:15:21 -0700 Subject: [PATCH] arch/arc: Let toolchain select tp-regno Zephyr cannot unilaterally set the -mtp-regno option as any libraries used from the toolchain must be built with the same option. This means that builds enabling thread local storage will fail when using a toolchain which does not specify a tp-regno value. That is better than potentially using toolchain library code which overwrites the selected register. Signed-off-by: Keith Packard --- arch/arc/CMakeLists.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/arch/arc/CMakeLists.txt b/arch/arc/CMakeLists.txt index 381cb72cecc2..9e75bb412c89 100644 --- a/arch/arc/CMakeLists.txt +++ b/arch/arc/CMakeLists.txt @@ -12,13 +12,6 @@ zephyr_cc_option(-fno-delete-null-pointer-checks) zephyr_cc_option_ifdef(CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS -munaligned-access) -if(CONFIG_ISA_ARCV2) - # Instruct compiler to use register R26 as thread pointer - # for thread local storage. - # For ARCv3 the register is fixed to r30, so we don't need to specify it - zephyr_cc_option_ifdef(CONFIG_THREAD_LOCAL_STORAGE -mtp-regno=26) -endif() - add_subdirectory(core) if(COMPILER STREQUAL arcmwdt)