bug-bash
[Top][All Lists]
Advanced

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

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


From: Simon Josefsson
Subject: Re: Parallelization of shell scripts for 'configure' etc.
Date: Fri, 08 Jul 2022 22:02:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Tim Rühsen <tim.ruehsen@gmx.de> 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


reply via email to

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