Bug 24317

Summary: generated deps don't list '-include'-ed files
Product: [Retired] Red Hat Linux Reporter: David Baron <dbaron>
Component: cppAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-24 18:36:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
rhbug24317.tar.gz - contains Makefile, incltest.c, and incltest.h none

Description David Baron 2001-01-18 22:49:57 UTC
With cpp and gcc 2.96-69 and 2.96-70, the compiler-generated
dependencies (-Wp,-MD,file) don't list files included via
-include.  (In gcc 2.91, such files were listed.)

I'll attach a testcase that compiles using the command:

gcc -o incltest.o -include incltest.h -Wp,-MD,incltest.d incltest.c

This generates incltest.d containing:

incltest.o: incltest.c

If I set CC=kgcc (which is gcc 2.91), it generates incltest.d as:

incltest.o: incltest.c incltest.h

I noticed this because making configure.in changes to Mozilla that
modified config-deps.h (a file used instead of -D...) wasn't causing
a full rebuild anymore.  While this is actually sometimes useful, I
still think it's a bug.

I'll attach a testcase (in tar.gz) of the Makefile and test files
mentioned above.

Comment 1 David Baron 2001-01-18 22:52:45 UTC
Created attachment 7828 [details]
rhbug24317.tar.gz - contains Makefile, incltest.c, and incltest.h

Comment 2 Jakub Jelinek 2001-01-24 18:36:03 UTC
Patch submitted to gcc-patches, it will appear in cpp-2.96-72.