This is the mail archive of the gcc@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]
Other format: [Raw text]

RE: Automatic dependency file generation bug/question


Ping (with one correction).

> -----Original Message-----
> From: ANDY KENNEDY
> Sent: Wednesday, January 15, 2014 3:16 PM
> To: 'gcc@gcc.gnu.org'
> Subject: Automatic dependency file generation bug/question
> 
> Reading <http://gcc.gnu.org/news/dependencies.html>, I find that
> dependency files should be created along the lines of
> 
> %.o:  %.c ...
> 
> In gcc version 4.4.4 (Slackware64 Linux version 13.0), I execute the
> following commands:
> 
> touch a.c
> gcc -c -MMD -MP -MF"a.d" -MT"a.d" -o "a.o" "a.c"
> cat a.d
> 
> and get the following output:
> 
> a.d a.o: a.c
> 
> which is precisely what I want.  However, I have a cross compiler using
> gcc version 4.7.3 which produces the following output using the same
> commands (obviously, with gcc replace with <path to >/bin/gcc:
> 
> a.d: a.c
> 
> I have been looking for the reason for the change, but am unable to find
> the rational.
> 
> Please advise whether this is a bug, or if this is meant to be the way
> gcc will work for all future releases.  As I see it, this complicates my
> Makefile(s) as I have two gcc version that behave differently.  This
> implies that my Makefile(s) will now require a section specifically
> dedicated to the .d file generation.  Whereas I remember that this used
> to be the way I had to construct the dependency list, this was
> cumbersome and the way e.g. 4.4.4 supported automatic dependency
> generation is preferable to me.
> 
> Thank you for your time,
> Andy


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