diff options
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r-- | gcc/lto-opts.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index c9d4e03d00c..2cb536bfc55 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -85,14 +85,35 @@ lto_write_options (void) function rather than per compilation unit. */ /* -fexceptions causes the EH machinery to be initialized, enabling generation of unwind data so that explicit throw() calls work. */ - if (global_options.x_flag_exceptions) + if (!global_options_set.x_flag_exceptions + && global_options.x_flag_exceptions) append_to_collect_gcc_options (&temporary_obstack, &first_p, "-fexceptions"); /* -fnon-call-exceptions changes the generation of exception regions. It is enabled implicitly by the Go frontend. */ - if (global_options.x_flag_non_call_exceptions) + if (!global_options_set.x_flag_non_call_exceptions + && global_options.x_flag_non_call_exceptions) append_to_collect_gcc_options (&temporary_obstack, &first_p, "-fnon-call-exceptions"); + /* The default -ffp-contract changes depending on the language + standard. Pass thru conservative standard settings. */ + if (!global_options_set.x_flag_fp_contract_mode) + switch (global_options.x_flag_fp_contract_mode) + { + case FP_CONTRACT_OFF: + append_to_collect_gcc_options (&temporary_obstack, &first_p, + "-ffp-contract=off"); + break; + case FP_CONTRACT_ON: + append_to_collect_gcc_options (&temporary_obstack, &first_p, + "-ffp-contract=on"); + break; + case FP_CONTRACT_FAST: + /* Nothing. That merges conservatively and is the default for LTO. */ + break; + default: + gcc_unreachable (); + } /* Output explicitly passed options. */ for (i = 1; i < save_decoded_options_count; ++i) |