aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-opts.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2014-10-07 07:56:43 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2014-10-07 07:56:43 +0000
commita35c1ac710c0bbd03f00380179a375c45c81f08a (patch)
treeddfc6423ea43b158728db7853802890da8621bf1 /gcc/lto-opts.c
parent7a0ca710c81d249cf8346eb243120dd6f727b354 (diff)
downloadgcc-a35c1ac710c0bbd03f00380179a375c45c81f08a.zip
gcc-a35c1ac710c0bbd03f00380179a375c45c81f08a.tar.gz
gcc-a35c1ac710c0bbd03f00380179a375c45c81f08a.tar.bz2
lto-opts.c (lto_write_options): Handle -fmath-errno, -fsigned-zeros and -ftrapping-math.
* lto-opts.c (lto_write_options): Handle -fmath-errno, -fsigned-zeros and -ftrapping-math. * lto-wrapper.c (merge_and_complain): Likewise. (run_gcc): Likewise. From-SVN: r215966
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