summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-opts.c
diff options
context:
space:
mode:
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-08-11 08:14:54 +0000
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>2017-08-11 08:14:54 +0000
commit07b8a4124a8bc7ffadb491bade270db8497a9783 (patch)
tree9758313b56edfd190549a5e205c9576068fe786e /gcc/c-family/c-opts.c
parentf4b56643a351a482689a8084946768818fbf1a56 (diff)
downloadgcc-07b8a4124a8bc7ffadb491bade270db8497a9783.tar.gz
Introduce TARGET_SUPPORTS_ALIASES
2017-08-11 Martin Liska <mliska@suse.cz> * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with TARGET_SUPPORTS_ALIASES. 2017-08-11 Martin Liska <mliska@suse.cz> * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with TARGET_SUPPORTS_ALIASES. * cgraph.c (cgraph_node::create_same_body_alias): Likewise. * ipa-visibility.c (can_replace_by_local_alias): Likewise. (optimize_weakref): Likewise. * symtab.c (symtab_node::noninterposable_alias): Likewise. * varpool.c (varpool_node::create_extra_name_alias): Likewise. * defaults.h: Introduce TARGET_SUPPORTS_ALIASES. 2017-08-11 Martin Liska <mliska@suse.cz> * decl2.c (get_tls_init_fn): Replace ASM_OUTPUT_DEF with TARGET_SUPPORTS_ALIASES. (handle_tls_init): Likewise. (note_mangling_alias): Likewise. Remove ATTRIBUTE_UNUSED for both arguments. * optimize.c (can_alias_cdtor): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251048 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r--gcc/c-family/c-opts.c22
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)