From 84dfe684656d0955e5318908d6c7c27c0d952558 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Thu, 18 Apr 2019 13:49:11 -0400 Subject: [PATCH] depends: Purge libtool archives We use pkg-config where we can, which generally replaces libtool at a higher level and does not have the same downsides as libtool. These archives sit in our depends tree with no purpose and pollute the final bitcoin build with massive overlinking. --- depends/packages.md | 12 ++++++++++++ depends/packages/libevent.mk | 1 + depends/packages/zeromq.mk | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/depends/packages.md b/depends/packages.md index ccdc85859..2c592885b 100644 --- a/depends/packages.md +++ b/depends/packages.md @@ -151,6 +151,18 @@ Most autotools projects can be properly staged using: $(MAKE) DESTDIR=$($(package)_staging_dir) install +## Build outputs: + +In general, the output of a depends package should not contain any libtool +archives. Instead, the package should output `.pc` (`pkg-config`) files where +possible. + +From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Handling_Libtool_Archives): + +> Libtool pulls in all direct and indirect dependencies into the .la files it +> creates. This leads to massive overlinking, which is toxic to the Gentoo +> ecosystem, as it leads to a massive number of unnecessary rebuilds. + ## Secondary dependencies: Secondary dependency packages relative to the bitcoin binaries/libraries (i.e. diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 840c68c0a..002b3e426 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -29,4 +29,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds + rm lib/*.la endef diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index 7a141c1c2..cc0fa405f 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -24,5 +24,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf bin share + rm -rf bin share lib/*.la endef