This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pch/14933] missing pre-compiled header depends with -MD
- From: "mjuric at astro dot princeton dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jul 2006 15:22:58 -0000
- Subject: [Bug pch/14933] missing pre-compiled header depends with -MD
- References: <bug-14933-8321@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from mjuric at astro dot princeton dot edu 2006-07-25 15:22 -------
Created an attachment (id=11935)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11935&action=view)
Proposed fix for improper dependency tracking with PCHs
This short patch addresses the issue of precompiled header dependencies not
being recorded during -MD pass. The problem appeared because deps_add_dep() was
never called from _cpp_stack_file, as all of .gch handling is done in
should_stack_file().
The patch fixes it by calling deps_add_dep() in should_stack_file(), if the
file under consideration is a precompiled header, and if restoration of
dependencies from .gch has not been requested (restore_pch_deps == false).
Applies to HEAD as well as 4.1.1.
PS: This revealed a separate issue with counterintuitive behavior of
restore_pch_deps == true (no dependencies shown), which I'll submit as a
separate bug and proposed patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14933