aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-opts.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r--gcc/lto-opts.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c
index 986fb97..ceccb6f 100644
--- a/gcc/lto-opts.c
+++ b/gcc/lto-opts.c
@@ -115,6 +115,24 @@ lto_write_options (void)
default:
gcc_unreachable ();
}
+ /* The default -fmath-errno, -fsigned-zeros and -ftrapping-math change
+ depending on the language (they can be disabled by the Ada and Java
+ front-ends). Pass thru conservative standard settings. */
+ if (!global_options_set.x_flag_errno_math)
+ append_to_collect_gcc_options (&temporary_obstack, &first_p,
+ global_options.x_flag_errno_math
+ ? "-fmath-errno"
+ : "-fno-math-errno");
+ if (!global_options_set.x_flag_signed_zeros)
+ append_to_collect_gcc_options (&temporary_obstack, &first_p,
+ global_options.x_flag_signed_zeros
+ ? "-fsigned-zeros"
+ : "-fno-signed-zeros");
+ if (!global_options_set.x_flag_trapping_math)
+ append_to_collect_gcc_options (&temporary_obstack, &first_p,
+ global_options.x_flag_trapping_math
+ ? "-ftrapping-math"
+ : "-fno-trapping-math");
/* We need to merge -f[no-]strict-overflow, -f[no-]wrapv and -f[no-]trapv
conservatively, so stream out their defaults. */
if (!global_options_set.x_flag_wrapv