[krbdev.mit.edu #5752] gcc -fworking-directory breaks make depend

Tom Yu via RT rt-comment at krbdev.mit.edu
Tue Sep 18 00:41:06 EDT 2007


I just had "make depend" fail spectacularly.

At some point recently (3.4.0?), gcc grew the option to output the
working directory in cpp output ("-fworking-directory").  This outputs
cpp line markers containing the working directory, and for some reason
occurs even while runing "make depend" using "gcc -M", causing broken
makefiles.  I think it's because passing "-g" to gcc may turn on
"-fworking-directory" due to the specfile.

Workaround is to set CFLAGS=-P or CFLAGS=-fno-working-directory when
running "make depend", but we might want to make the depfix script
deal with the spurious line markers if they get output.
Alternatively, or additionally, add to ALL_CFLAGS a variable named
DEP_CFLAGS or something like that which will get configured to contain
gcc-version-specific flags to suppress line markers.  Stripping line
markers in depfix sounds easier though.




More information about the krb5-bugs mailing list