]> git.draconx.ca Git - dxcommon.git/commit
fix-gnulib: Reduce build-time impact of symbol renaming.
authorNick Bowler <nbowler@draconx.ca>
Wed, 16 Feb 2022 03:22:59 +0000 (22:22 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 18 Feb 2022 03:35:00 +0000 (22:35 -0500)
commite7d29006d05055ab5b7af44078668c1915d35262
tree6cbeff3bafdb34c11cf022ddef80c6f647b9968a
parent114346686fbed4b26fb1d483dd328a39a62e7563
fix-gnulib: Reduce build-time impact of symbol renaming.

Often a package will use more gnulib modules than actually needed by a
library, with included utilities also making use of portability features
provided by gnulib.

With symbol renaming computed over all objects, as well as linking
everything into both libraries and programs, this leads to compiling
every required gnulib source 3 times, ouch!  And due to how libtool
convenience libraries work, the unused modules are probably wasting
space in the library to boot.

We can do better.

We can partition the gnulib objects into two groups: those that are
needed by the library (and thus require symbol renaming) and the rest
which are only needed by programs.  Only the first group needs any
special treatment.  The others can be put into an ordinary static
library which is not installed.

A new macro, DX_GNULIB_SYMFILES, provides the machinery to do this.
m4/gnulib-shared.m4 [new file with mode: 0644]
scripts/fix-gnulib.pl
snippet/glconfig.mk
tests/macros.at