This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC vs. `make' on Solaris
- To: mrs at windriver dot com
- Subject: Re: GCC vs. `make' on Solaris
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 11 May 2001 18:05:25 -0700
- Cc: gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <200105112300.QAA26021@kankakee.wrs.com>
>>>>> "Mike" == Mike Stump <mrs@windriver.com> writes:
Mike> Gosh, while we can investigate this, we should not do it
Mike> because of a random stupid bug on Solaris. If build times
Mike> are within a few % of the non stamp build, then it would be
Mike> reasonable, if they are 4x longer, then I am in no way in
Mike> favor of doing this. Making this type of decision without
Mike> supporting data would be bad.
Why will they be any longer at all?
If we have:
x.o: s-foo
gcc -c x.c
s-foo: bar
bar > tmp-foo
move-if-change tmp-foo foo
touch s-foo
Make will rebuild `x.o' whenever s-foo is out of date (i.e., whenever
`bar' changes), even if foo is not modified.
I can measure this, though.
I think the point of this trick is so that you can (in two steps) do:
make s-foo
make x.o
If you do it this way then x.o will not be rebuilt unless it really
needs to be. That's a silly optimization; when you're doing
development rebuilding the compiler is now a very cheap operation. On
any modern box, rebuilding cc1 takes only a few minutes at most. The
real killer is rebuilding the libraries -- and this trickery has no
effect there.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com