diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 09:40:15 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-04 09:40:15 +0000 |
commit | 6756f4d27ac4576dd94fa5049c41c44f26c2b95e (patch) | |
tree | 4e0f40347c54926e23c511d26a4a282449a2ee8c /gcc/fortran/options.c | |
parent | f2603d78cc5187140ca915f642d758d2e2cbe5b6 (diff) |
2009-11-04 Richard Guenther <rguenther@suse.de>
* c-opts.c (c_common_post_options): Move LTO option processing
code ...
* opts.c (decode_options): ... here.
fortran/
* options.c (gfc_post_options): Rely on common code processing
LTO options. Only enable -fwhole-file here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153889 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r-- | gcc/fortran/options.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index d2c6d9ba8495..3742addb6b11 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -242,27 +242,9 @@ gfc_post_options (const char **pfilename) if (flag_whole_program) gfc_option.flag_whole_file = 1; + /* Enable whole-file mode if LTO is in effect. */ if (flag_lto || flag_whopr) - { -#ifdef ENABLE_LTO - flag_generate_lto = 1; - - /* When generating IL, do not operate in whole-program mode. - Otherwise, symbols will be privatized too early, causing link - errors later. */ - flag_whole_program = 0; - - /* But do enable whole-file mode. */ - gfc_option.flag_whole_file = 1; -#else - error ("LTO support has not been enabled in this configuration"); -#endif - } - - /* Reconcile -flto and -fwhopr. Set additional flags as appropriate and - check option consistency. */ - if (flag_lto && flag_whopr) - error ("-flto and -fwhopr are mutually exclusive"); + gfc_option.flag_whole_file = 1; /* -fbounds-check is equivalent to -fcheck=bounds */ if (flag_bounds_check) |