Re: Question about autoreconf to regenerate configuration files

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <Yg3apoTMTMojanx/@vapier>
On 26 Jan 2022 05:02, Mike Frysinger wrote:
> On 21 Jan 2022 17:09, Mike Frysinger wrote:
> > On 21 Jan 2022 17:09, R. Diez via Newlib wrote:
> > > > [...]
> > > > The bootstrap time was large enough to
> > > > negatively impact our ability to do automated regression testing.
> > > 
> > > A very long bootstrap time could be an issue.
> > > 
> > > However, compilation time normally outweighs by far the Autotools regeneration step. Is that a problem in Newlib at the moment?
> > 
> > autotools (autoreconf really) doesn't run in parallel, so every subdir
> > with a configure script needs a separate serialized run of all the tools.
> > newlib has many many of these (arguably, too many).
> > 
> > on my quad core 4.2GHz AMD that is otherwise idle ...
> > 
> > $ time (cd newlib && autoreconf)
> > real    5m22.170s
> > user    3m13.709s
> > sys     0m12.332s
> > 
> > $ time (cd libgloss && autoreconf)
> > real    1m41.754s
> > user    0m43.505s
> > sys     0m3.618s
> > <this errored out, not sure why, so it might normally take even longer :p>
> > 
> > # Blackfin builds 8 copies (multilib) of newlib+libgloss by default.
> > $ time (cd build; ../configure --host=bfin-elf; make -j4)
> > real    1m40.950s
> > user    0m58.032s
> > sys     0m30.968s
> 
> updated timings on my system after recent work to delete many configure scripts
> $ time (cd newlib && autoreconf)
> real    1m0.619s
> user    0m45.249s
> sys     0m1.535s
> 
> $ time (cd libgloss && autoreconf -I$PWD -I$PWD/.. -I$PWD/../config)
> real    0m32.662s
> user    0m15.858s
> sys     0m1.205s
> 
> $ time (cd build; ../configure --host=bfin-elf; make -j4)
> real    1m2.337s
> user    0m44.987s
> sys     0m26.708s
> 
> so it's def better, but autotool generation still takes longer than actually
> compiling newlib+libgloss 8 times :).

things are looking up.  with all my pending changes, we have 1 configure script
in newlib and no recursive makes.

$ time (cd newlib && autoreconf)
real    0m8.740s
user    0m7.524s
sys     0m0.193s

i'm not sure if i'll "finish" libgloss.  there's still a lot of subdirs not
even using automake, so while i can kill most configure scripts, i prob won't
do them all, and i prob won't convert more to automake or non-recursive make.
the libgloss arches have a lot harrier logic in them that i don't care to try
to unpack, especially since i converted the dirs i most care about.

$ time (cd libgloss && autoreconf -I$PWD -I$PWD/.. -I$PWD/../config)
real    0m8.313s
user    0m5.015s
sys     0m0.259s

we can see that killing excessive configure scripts & recursive makes helps
with compilation times too.

$ time (cd build; ../configure --host=bfin-elf; make -j4)
real    0m28.831s
user    0m34.828s
sys     0m23.093s

generating autotools is now slightly faster that compiling 8 copies of
newlib+libgloss :).  not that i'm advocating for changing anything :P.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIN2qYACgkQQWM7n+g3
9YG62xAAq/qDZjqW+rOi+3u5Jo4n8QTK2xoZpwFD6DH7pBkDTOyXmMp1lWPRBWos
HrPt4Ql/AKYKIrNZ89NcxEnd/qqZp5g1WQCCIVrGffWY4rswfYNuXd8gVbvRZfpF
agtIfM+h/ljhjEj3cJTNyZ2i/Jwmt1dWLDGnYx87kRhQDOCTWLoDnRci2Z7TrO1l
TxOMqu10yWSpZIv7PsVU4qrGXUYwBU22XBOrXOU6h22ksEXk2tWxdEJHnjxKYNFr
6qN7dk5sDZsZGerm4RNZf1WAmSTMK4TADR7yEU14JN5QZFujJXjLqofkDAh10C7g
W/4SSCqGsz3qZWYXCX8Lkc3x9ZSXw0+Z2J6E+g9B/WIy2DQF5h3NdbdF/lfYJhgA
7CXXzAPR9x3b9sYgySajpktybBiJtuxBki4z+5ajiuFiinm3MrP0lhqyrzAFdRQu
nEEWkW+Afn1ax+O+2b9Wz+orzWL7wZ3c20o5mJcUOZUjq7QHL4x+0VuSsE67acs4
HBkE9XyrqYey3jZvWh5yYzvxqtQIZ5Yvh01/cqp/Z9IiQXSHGkNjLfHkYuJNhflT
ybvcMVelEdGkdGONDRPbpbMRYUFl+x68fyBfmhdkK0LueGrok81SWpZgSAlSenmX
ArDEbuIJRTmyGdOiFF0WTLpahSNeVB+EIsHWfycto3FKwYnVU6g=
=c55S
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.