Skip to content

Commit 683b7d7

Browse files
committed
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.
1 parent 1420928 commit 683b7d7

File tree

13 files changed

+48
-3
lines changed

13 files changed

+48
-3
lines changed

depends/packages.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,18 @@ Most autotools projects can be properly staged using:
151151

152152
$(MAKE) DESTDIR=$($(package)_staging_dir) install
153153

154+
## Build outputs:
155+
156+
In general, the output of a depends package should not contain any libtool
157+
archives. Instead, the package should output `.pc` (`pkg-config`) files where
158+
possible.
159+
160+
From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Handling_Libtool_Archives):
161+
162+
> Libtool pulls in all direct and indirect dependencies into the .la files it
163+
> creates. This leads to massive overlinking, which is toxic to the Gentoo
164+
> ecosystem, as it leads to a massive number of unnecessary rebuilds.
165+
154166
## Secondary dependencies:
155167

156168
Secondary dependency packages relative to the bitcoin binaries/libraries (i.e.

depends/packages/dbus.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ define $(package)_stage_cmds
2121
$(MAKE) -C dbus DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-dbusincludeHEADERS install-nodist_dbusarchincludeHEADERS && \
2222
$(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA
2323
endef
24+
25+
define $(package)_postprocess_cmds
26+
rm lib/*.la
27+
endef

depends/packages/expat.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ endef
2020
define $(package)_stage_cmds
2121
$(MAKE) DESTDIR=$($(package)_staging_dir) install
2222
endef
23+
24+
define $(package)_postprocess_cmds
25+
rm lib/*.la
26+
endef

depends/packages/fontconfig.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ endef
2626
define $(package)_stage_cmds
2727
$(MAKE) DESTDIR=$($(package)_staging_dir) install
2828
endef
29+
30+
define $(package)_postprocess_cmds
31+
rm lib/*.la
32+
endef

depends/packages/freetype.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@ endef
2020
define $(package)_stage_cmds
2121
$(MAKE) DESTDIR=$($(package)_staging_dir) install
2222
endef
23+
24+
define $(package)_postprocess_cmds
25+
rm lib/*.la
26+
endef

depends/packages/libX11.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ endef
2525
define $(package)_stage_cmds
2626
$(MAKE) DESTDIR=$($(package)_staging_dir) install
2727
endef
28+
29+
define $(package)_postprocess_cmds
30+
rm lib/*.la
31+
endef

depends/packages/libXau.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ endef
2525
define $(package)_stage_cmds
2626
$(MAKE) DESTDIR=$($(package)_staging_dir) install
2727
endef
28+
29+
define $(package)_postprocess_cmds
30+
rm lib/*.la
31+
endef

depends/packages/libXext.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ endef
2424
define $(package)_stage_cmds
2525
$(MAKE) DESTDIR=$($(package)_staging_dir) install
2626
endef
27+
28+
define $(package)_postprocess_cmds
29+
rm lib/*.la
30+
endef

depends/packages/libevent.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ define $(package)_stage_cmds
2727
endef
2828

2929
define $(package)_postprocess_cmds
30+
rm lib/*.la
3031
endef

depends/packages/libxcb.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ define $(package)_stage_cmds
3232
endef
3333

3434
define $(package)_postprocess_cmds
35-
rm -rf share/man share/doc
35+
rm -rf share/man share/doc lib/*.la
3636
endef

0 commit comments

Comments
 (0)