From: Stefano Lattarini Date: Sat, 27 Oct 2012 09:12:59 +0000 (+0200) Subject: depcomp: improve comments about the 'gcc' depmode X-Git-Tag: v1.12.5~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=078ff407c4b50309c65c7c8eb61d6b08f4d2577e;p=thirdparty%2Fautomake.git depcomp: improve comments about the 'gcc' depmode It is not only needed by obsolescent gcc compilers (pre-3.x), but also by modern compiler like IBM C/C++. State that ... * lib/depcomp: ... here... * gen-testsuite-part: ... and here, where we generate the 'depcomp*.tap' tests. Signed-off-by: Stefano Lattarini --- diff --git a/gen-testsuite-part b/gen-testsuite-part index 6ed193186..96f43ccae 100755 --- a/gen-testsuite-part +++ b/gen-testsuite-part @@ -340,8 +340,11 @@ my %depmodes = makedepend => ["cc", "makedepend"], dashmstdout => ["gcc"], cpp => ["gcc"], -# This is for older (pre-3.x) GCC versions. Newer versions -# have depmode "gcc3". +# This was for older (pre-3.x) GCC versions (newer versions +# have depmode "gcc3"). But other compilers use this depmode +# as well (for example, the IMB xlc/xlC compilers, and the HP +# C compiler, see 'lib/depcomp' for more info), so it's not +# obsolete, and it's worth giving it some coverage. gcc => ["gcc"], # This is for older (pre-7) msvc versions. Newer versions # have depmodes "msvc7" and "msvc7msys". diff --git a/lib/depcomp b/lib/depcomp index ee84bf286..693fe0496 100755 --- a/lib/depcomp +++ b/lib/depcomp @@ -142,13 +142,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then