This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: build regression
- From: Tom Tromey <tromey at redhat dot com>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: GCC Hackers <gcc at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: 14 Jun 2003 20:28:24 -0600
- Subject: Re: build regression
- References: <87znkkzgqu.fsf@fleche.redhat.com><20030614185607.GD28612@daikokuya.co.uk><20030614203206.GA6054@daikokuya.co.uk>
- Reply-to: tromey at redhat dot com
>>>>> "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