This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: build regression


>>>>> "Neil" == Neil Booth <neil@daikokuya.co.uk> writes:

Neil> Sadly this doesn't work as the Makefiles in java/ expect cc1 to
Neil> take an argument to -MD (grrr...).  I'm testing this instead.

Ah, yeah, I forgot about that.

This is legacy stuff from a long time ago -- before all the new -M*
options were added.  Back in the day, the best way to generate
dependencies using gcc was to use -Wp,-MD.  Here's the comment from
the automake depcomp script (these days this code is still used for
pre-3.0 gcc) that explains the situation:

## 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).
## - Using -M directly means running the compiler twice (even worse
##   than renaming).


Automake 1.5+ uses a different dependency tracking method and, when
using gcc 3.0, you'll never end up invoking `gcc -Wp,-MD'.
Unfortunately part of the world, including the gcc tree, still uses
1.4.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]