[distcc] about add gcc/cpp version check to avoid -MD option.
ZhangJieJing
kzjeef at gmail.com
Sat Apr 25 04:37:25 GMT 2009
Hello all,
The distcc now not support gcc -MD without -MF very well, because distcc
will strip -o out, so the cpp will put the dependency file to the current
directory, but the makefile may put the object file and dependency file to
another directory.
the comments in cpp.c:
/* We strip the -o option and allow cpp to write to stdout, which is
* caught in a file. Sun cc doesn't understand -E -o, and gcc screws up
* -MD -E -o.
*
* There is still a problem here with -MD -E -o, gcc writes dependencies
* to a file determined by the source filename. We could fix it by
* generating a -MF option, but that would break compilation with older
* versions of gcc. This is only a problem for people who have the source
* and objects in different directories, and who don't specify -MF. They
* can fix it by specifying -MF. */
The comments said that some older versions of gcc will broken by
generating a -MF option,So I'm thinking can we add a version record of
gcc, and allow us to add a -MF to some version of gcc, so we may find
out the oldest cann't broken by this behavior.
what's you opinion?
Best regards,
Zhang Jiejing
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the distcc
mailing list