depcomp: improve comments about the 'gcc' depmode
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 27 Oct 2012 09:12:59 +0000 (11:12 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 27 Oct 2012 09:12:59 +0000 (11:12 +0200)
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 <stefano.lattarini@gmail.com>
gen-testsuite-part
lib/depcomp

index 6ed1931..96f43cc 100755 (executable)
@@ -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".
index ee84bf2..693fe04 100755 (executable)
@@ -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