OSDN Git Service

2012-01-18 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jan 2012 13:10:40 +0000 (13:10 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Jan 2012 13:10:40 +0000 (13:10 +0000)
* c-opts.c (c_common_post_options): Reset LTO flags if
we are about to generate a PCH.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183272 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/c-family/ChangeLog
gcc/c-family/c-opts.c

index 2746d04..c2045f9 100644 (file)
@@ -1,3 +1,8 @@
+2012-01-18  Richard Guenther  <rguenther@suse.de>
+
+       * c-opts.c (c_common_post_options): Reset LTO flags if
+       we are about to generate a PCH.
+
 2012-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/51777
index 4f0d886..f2a7971 100644 (file)
@@ -1058,6 +1058,13 @@ c_common_post_options (const char **pfilename)
       && flag_preprocess_only && !flag_no_line_commands)
     pp_dir_change (parse_in, get_src_pwd ());
 
+  /* Disable LTO output when outputting a precompiled header.  */
+  if (pch_file && flag_lto)
+    {
+      flag_lto = 0;
+      flag_generate_lto = 0;
+    }
+
   return flag_preprocess_only;
 }