libtool
[Top][All Lists]
Advanced

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

Re: Announcing Dolt, a drop-in Libtool replacement which cuts build time


From: Richard Purdie
Subject: Re: Announcing Dolt, a drop-in Libtool replacement which cuts build times in half
Date: Sun, 13 Apr 2008 12:55:01 +0100

Josh Triplett <josh <at> freedesktop.org> writes:
> Thus, I wrote Dolt, a drop-in replacement for libtool's compilation
> mode.  Dolt runs any necessary system-specific or
> configuration-specific logic as part of configure, writes out a simple
> shell script "doltcompile"[1], and substitutes it for libtool in the
> automake variables LTCOMPILE and LTCXXCOMPILE.  If you use automake,
> autoconf, and libtool, then using Dolt just requires two steps:
> 
> 1) add "DOLT" after the call to LT_INIT, AC_PATH_LIBTOOL, or
>    AM_PATH_LIBTOOL in your configure.ac or configure.in script, and
> 2) append dolt.m4 to your project's acinclude.m4.
> 
> For any system Dolt does not support, it will transparently fall back
> to libtool.

I work with Poky (pokylinux.org) and OpenEmbedded (openembedded.org) which are
cross compiling build systems and speed improvements like this are extremely
useful to us. Those systems also provide an interesting testing ground
where we can expose changes like this to a wide variety of source code.

I found this last part doesn't hold true, dolt does not fall back to
libtool transparently, the reason being the AC_SUBST causes LTCOMPILE to
become "", even if that section of the if block isn't called. I couldn't
find a nice way to fix this since AC_SUBST operates at reautoconf time,
not at configure and you only know if the system is compatible at
configure time.

Poky/OE use an old libtool (1.5.10) since we have various hacks we had
to make to get libtool to support cross compiling sanely[1] and
everytime we've tried to upgrade, something goes wrong and we've never
had time to debug the newer versions.

[1] Are there any plans to support sysroots with libtool?

In the interests of experimentation I hacked dolt into our libtool
recipe, inserting it into libtool.m4 in AC_PROG_LIBTOOL so I didn't have
to change any apps. I enabled it for arm linux targets and removed the
broken fallback code. The test build I used as a benchmark builds a
cross compiling toolchain and then from that a complete PDA style system
including X and some GTK+ apps with all the parts in between, many of
which use libtool.

Before the dolt change this image took 108 minutes, afterwards it took
96 minutes so an 11% reduction in time which is certainly beneficial!

Cheers,

Richard





reply via email to

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