This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/3500: location of output .d (dependancy file from -MMR switch) has changed from previous releases



>Number:         3500
>Category:       c
>Synopsis:       location of output .d (dependancy file from -MMR switch) has changed from previous releases
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 30 14:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     ron flory rjflory@hiwaay.net
>Release:        gcc 2.96 and gcc 2.96
>Organization:
>Environment:
RedHat Linux (x86) 7.1 on several x86 (intel/amd) systems.

 Problem present in stock RedHay 7.1 as well as recent gcc
RPM updates (early june 2001).
>Description:
 The -MMR compiler switch generates an output file 
containing a 'rule' suitable for direct inport into GNU 
'make'.  Many projects use this for auto dependancy
generation.

 Typical use: gcc -MMR -c -o obj/xyz.o xyz.cpp

 Until recently, the output dependancy file was placed in
the 'current' directory, however with gcc 2.95 and 2.96
the dependancy file '*.d' is placed in the path specified
in the compiler '-o' directive.  If the user places the 
object in a different directory than the current directory,
the dependancy file now appears to be placed in the 
directory specified to hold the object file.

 This breaks a great many existing project makefiles because
the expected '*.d' dependancy file is no longer in the
'current' directory, but in the 'objects' directory
instead.
>How-To-Repeat:
for any single C/C++ source file including files in addition
to 'syatem' headers:

 gcc -MMR -c -o obj/xyz.o xyz.cpp

 the dependancy file xyx.d is now placed in obj/xyz.d
 instead of the current directory, as it used to be.
>Fix:
Recent compiler changes have probably forgotten to strip
path information from the output filename when creating 
the '.d' dependancy output file.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="non necessary."
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="non necessary."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]