[PATCH] Temporarily revert Steven's PCH changes for 4.8 (PR pch/54117)

Jakub Jelinek jakub@redhat.com
Wed Feb 13 23:49:00 GMT 2013


On Thu, Feb 14, 2013 at 12:41:30AM +0100, Steven Bosscher wrote:
> > I agree with David that it might be better to give up pch.
> 
> That'd be a really a good start.

You can do it with say following patch instead, PCH is just a compile time
optimization, so for -gstabs IMHO it is just fine if we just give up.

--- gcc/c-family/c-opts.c.jj	2013-02-13 23:48:14.000000000 +0100
+++ gcc/c-family/c-opts.c	2013-02-14 00:41:05.325625590 +0100
@@ -943,8 +943,11 @@ c_common_post_options (const char **pfil
 
       /* When writing a PCH file, avoid reading some other PCH file,
 	 because the default address space slot then can't be used
-	 for the output PCH file.  */
-      if (pch_file)
+	 for the output PCH file.  Also, avoid reading PCH files when
+	 debug info in format other than DWARF is requested.  */
+      if (pch_file
+	  || (write_symbols != NO_DEBUG
+	      && write_symbols != DWARF2_DEBUG))
 	c_common_no_more_pch ();
 
       /* Yuk.  WTF is this?  I do know ObjC relies on it somewhere.  */


	Jakub



More information about the Gcc-patches mailing list