]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: Fix --disable-static option build
authorDave Chinner <dchinner@redhat.com>
Tue, 7 Apr 2020 18:29:39 +0000 (14:29 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 7 Apr 2020 18:29:39 +0000 (14:29 -0400)
commit825b743251b55e9713f13de2718ca6ffb3358ab4
tree9543960ded94f4ddbe76b44cd8caefaf651a224b
parent105041e64ad37953ead5227c88410d88eef910fa
xfsprogs: Fix --disable-static option build

Internal xfsprogs libraries are linked statically to binaries as
they are not shipped libraries. Using --disable-static prevents the
internal static libraries from being built and this breaks dead code
elimination and results in linker failures from link dependencies
introduced by dead code.

We can't remove the --disable-static option that causes this as it
is part of the libtool/autoconf generated infrastructure. We can,
however, override --disable-static on a per-library basis inside the
build by passing -static to the libtool link command. Therefore, add
-static to all the internal libraries we build and link statically
to the shipping binaries.

This build command now succeeds:

$ make realclean; make configure; ./configure --disable-static ; make

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libfrog/Makefile
libxcmd/Makefile
libxfs/Makefile
libxlog/Makefile