automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to get rid of -MP parameter to gcc for dependency creation?


From: Xan Lopez
Subject: Re: Any way to get rid of -MP parameter to gcc for dependency creation?
Date: Tue, 4 Jan 2011 14:21:01 +0100

On Tue, Jan 4, 2011 at 7:56 AM, Ralf Wildenhues <address@hidden> wrote:
> Before changing Automake or GNU make, can you first please post which
> GNU make version you are using on what system and file system exactly,
> and if you are not using the very latest GNU make, retry with that?

I'm using a CVS snapshot from late 2009. The reason is that I need a
patched GNU make for 'make dist' to work. The patch is
http://thread.gmane.org/gmane.comp.gnu.make.bugs/4219, it was made by
you (hi again, thanks!) on response to a report I sent. It seems this
never made it upstream, so I guess at this point it might be more
sensible to apply some workaround to WebKit. The system is Fedora 13
with ext4, kernel 2.6.34, CPU i7 2.67Ghz and the HDD is a standard
laptop 7200rpm thingie.

Without the local hack to get rid of the -MP flag a null-build with
that version of GNU make is ~40s. CVS HEAD gives ~26s (wow!), and CVS
HEAD with the "get rid of -MP" hack gives ~14s. So definitely there's
been a big improvement in Make in the last year, thanks for pointing
that out. It still seems worth to try to improve the -MP case though,
26 > 14 is a big win.

>
> Then, how many stub targets get added due to -MP in your project?

Some grep hackery gives me 3,030,859 empty rules in total in all .Plo
files in the build tree.

>
> FWIW, on big systems I typically just put the build tree on a ramdisk
> (/dev/shm or so) which has a nice positive effect on build times.  I'm
> not sure whether for the -MP overhead you would need to put the source
> tree there too.  Can you try, even if only for the sake of analysis
> rather than making this a habit?  Thanks.

I've tried this and there's basically no perceptible difference
AFAICT. I only have the builddir in /dev/shm, since I don't think I
can fit the whole thing in RAM in my laptop. Hope it helps.

Thanks for all the help!

Xan

>
> Elsewhere, you wrote:
>> [1]: I found this thread,
>> http://lists.gnu.org/archive/html/automake/2003-12/msg00103.html, from
>> years ago, but I'm not sure there was any definitive conclusion, and
>> gcj nowadays seems different than how the mail implies it was back
>> then.
>
> Yes, this particular issue was addressed, quoting automake-1.9/NEWS:
>
> * Makefile.in bloat reduction:
>
>  - Inference rules are used to compile sources in subdirectories when
>    the `subdir-objects' option is used and no per-target flags are
>    used.  This should reduce the size of some projects a lot, because
>    Automake used to output an explicit rule for each such object in
>    the past.
>
>  - Automake no longer outputs three rules (.o, .obj, .lo) for each
>    object that must be built with explicit rules.  It just outputs
>    the rules required to build the kind of object considered: either
>    the two .o and .obj rules for usual objects, or the .lo rule for
>    libtool objects.
>
> Thanks,
> Ralf
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]