diff options
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/gcc/elna-builtins.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/gcc/elna-builtins.cc b/gcc/gcc/elna-builtins.cc index a8e54c8..365ddb9 100644 --- a/gcc/gcc/elna-builtins.cc +++ b/gcc/gcc/elna-builtins.cc @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "elna/gcc/elna1.h" #include "stor-layout.h" #include "stringpool.h" +#include "varasm.h" #include "elna/boot/evaluator.h" #include "elna/gcc/elna-tree.h" @@ -413,6 +414,13 @@ namespace elna::gcc DECL_EXTERNAL(declaration_tree) = static_cast<unsigned>(imported || variable_info->is_extern); + + // The model depends on the linkage, so it is chosen after + // DECL_EXTERNAL is final. + if (variable_info->is_thread_local) + { + set_decl_tls_model(declaration_tree, decl_default_tls_model(declaration_tree)); + } } else if (auto procedure_info = symbol_info->is_procedure()) { |
