diff options
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r-- | gcc/c-family/c-opts.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 1657e7a4390..0b13a188c1b 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -957,16 +957,18 @@ c_common_post_options (const char **pfilename) if (flag_extern_tls_init) { -#if !defined (ASM_OUTPUT_DEF) || !SUPPORTS_WEAK - /* Lazy TLS initialization for a variable in another TU requires - alias and weak reference support. */ - if (flag_extern_tls_init > 0) - sorry ("external TLS initialization functions not supported " - "on this target"); - flag_extern_tls_init = 0; -#else - flag_extern_tls_init = 1; -#endif + if (!TARGET_SUPPORTS_ALIASES || !SUPPORTS_WEAK) + { + /* Lazy TLS initialization for a variable in another TU requires + alias and weak reference support. */ + if (flag_extern_tls_init > 0) + sorry ("external TLS initialization functions not supported " + "on this target"); + + flag_extern_tls_init = 0; + } + else + flag_extern_tls_init = 1; } if (num_in_fnames > 1) |