Re: [AD] a tiny patch to djgpp's make depend

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Shawn Hargreaves wrote:
> Sven Sandberg <ssven.geo@xxxxxxxxxx> writes:
> > gcc 2.95.* generates a dependency with an 
> > absolute path (d:/djgpp/include/sys/version.h) which has to be seded 
> > out.
> 
> Whoah, that looks like a compiler bug to me! Rather than just removing 
> this, I'd like to find out why it's happening at all and try to get it 
> fixed.
> 
> The -MM switch (unlike -M) ought never to output dependencies for 
> system headers. The only explanations I can think of is that either the > compiler specs file (in djgpp/lib) is doing something really strange, 
> or somewhere along the line somebody has included version.h, or another 
> system header that then includes it, with the wrong sort of quotes ("" 
> instead of <>). But I can't find any attempts to include version.h from 
> Allegro headers, and in the djgpp headers it is only included twice, 
> from go32.h and stdio.h, both of which use the <> syntax. Does this 
> also hold true for your version? Which files in particular are being 
> given this dependency?

I don't know for sure, but judging by the contents of version.h (macro
definitions of DJGPP, __GNUC__ etc) this looks like the compiler's way
of saying that the source depends on the version of gcc, ie that some of
those macros are used, rather than that someone actually included the
file. I think all files get this dependency (this is also consistent
with my guess since all files include alconfig.h which uses the DJGPP
macro). I haven't actually grepped the system headers for the inclusion
of version.h, but IIRC those macros should not be defined the normal way
but by the compiler itself so I would expect anyone who manually
includes version.h to get a warning for the redefined macro. I'll take a
deeper look at this as a homework for tomorrow though :o)

Sven



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/