Re: Parallelization of shell scripts for 'configure' etc.

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

 



Tim Rühsen <tim.ruehsen@xxxxxx> writes:

> a) The maintainer/contributor/hacker setup
> This is when you re-run configure relatively often for the same project(s).
> I do this normally and and came up with
> https://gitlab.com/gnuwget/wget2/-/wikis/Developer-hints:-Increasing-speed-of-GNU-toolchain. 
> It may be a bit outdated, but may help one or the other here.
> Btw, I am down to 2.5s for a ./configure run from 25s originally.

Wow, I think more developers should known about your final suggestion:

https://gitlab.com/gnuwget/wget2/-/wikis/Developer-hints:-Increasing-speed-of-GNU-toolchain#cccflags-dependent-usage-of-configure-caching

That is, put this in ~/.bash_aliases:

export CONFIG_SITE=~/src/config.site

and this in ~/src/config.site:

if test "$cache_file" = /dev/null; then
  hash=`echo $CFLAGS $LDFLAGS $host_alias $build_alias|md5sum|cut -d' ' -f1`
  cache_file=~/src/config.cache.$CC.$hash
fi

The top of config.log says which cache file was used, so you can remove
it when you hack on autoconf/M4 macros.

This appears to save me tons of build time, and I'll run with this now
since it is non-obtrusive and doesn't require changes in each project...
maybe the CWD should be put into the cache_file string to avoid cache
poisining between projects, but that is minor.

/Simon

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux