about add gcc/cpp version check to avoid -MD option.

ZhangJieJing <[email protected]>
Newsgroups gmane.comp.compilers.distcc
Message-ID <[email protected]>
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

__ 
distcc mailing list            http://distcc.samba.org/
To unsubscribe or change options: 
https://lists.samba.org/mailman/listinfo/distcc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.