diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-19 05:25:25 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-19 05:25:25 +0000 |
commit | 1c4973d7708d34b68e9ad7d46cd1623ce1609734 (patch) | |
tree | 6f07da7f6452368c46a7fccdd8d5a008127dbe83 /gcc/c-family/c-opts.c | |
parent | b7fd3d269ebd953bb44b2a46e0a2a30b12b0a505 (diff) | |
download | ppe42-gcc-1c4973d7708d34b68e9ad7d46cd1623ce1609734.tar.gz ppe42-gcc-1c4973d7708d34b68e9ad7d46cd1623ce1609734.zip |
PR target/54908
c-family/
* c.opt (-fextern-tls-init): New.
* c-opts.c (c_common_post_options): Handle it.
cp/
* decl2.c (get_local_tls_init_fn): New.
(get_tls_init_fn): Handle flag_extern_tls_init. Don't bother
with aliases for internal variables. Don't use weakrefs if
the variable needs destruction.
(generate_tls_wrapper): Mark the wrapper as const if no
initialization is needed.
(handle_tls_init): Don't require aliases.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195310 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r-- | gcc/c-family/c-opts.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 3fabb36faff..1a922a81c35 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -901,6 +901,20 @@ c_common_post_options (const char **pfilename) else if (warn_narrowing == -1) warn_narrowing = 0; + 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 (flag_preprocess_only) { /* Open the output now. We must do so even if flag_no_output is |