diff options
author | Carl Dong <accounts@carldong.me> | 2019-04-18 13:49:11 -0400 |
---|---|---|
committer | Carl Dong <accounts@carldong.me> | 2019-05-28 11:02:42 -0400 |
commit | 683b7d7a3fc1b9240333faf3d04497aa61583016 (patch) | |
tree | 76237925723b5850a00f9703121a7883f84384d6 /depends | |
parent | 14209286df4a91a0e6738268339ba667d868a11f (diff) |
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.
Diffstat (limited to 'depends')
-rw-r--r-- | depends/packages.md | 12 | ||||
-rw-r--r-- | depends/packages/dbus.mk | 4 | ||||
-rw-r--r-- | depends/packages/expat.mk | 4 | ||||
-rw-r--r-- | depends/packages/fontconfig.mk | 4 | ||||
-rw-r--r-- | depends/packages/freetype.mk | 4 | ||||
-rw-r--r-- | depends/packages/libX11.mk | 4 | ||||
-rw-r--r-- | depends/packages/libXau.mk | 4 | ||||
-rw-r--r-- | depends/packages/libXext.mk | 4 | ||||
-rw-r--r-- | depends/packages/libevent.mk | 1 | ||||
-rw-r--r-- | depends/packages/libxcb.mk | 2 | ||||
-rw-r--r-- | depends/packages/protobuf.mk | 2 | ||||
-rw-r--r-- | depends/packages/qrencode.mk | 4 | ||||
-rw-r--r-- | depends/packages/zeromq.mk | 2 |
13 files changed, 48 insertions, 3 deletions
diff --git a/depends/packages.md b/depends/packages.md index ccdc858593..2c592885b6 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/dbus.mk b/depends/packages/dbus.mk index 0460a2f2e4..ad10b0fdd7 100644 --- a/depends/packages/dbus.mk +++ b/depends/packages/dbus.mk @@ -21,3 +21,7 @@ define $(package)_stage_cmds $(MAKE) -C dbus DESTDIR=$($(package)_staging_dir) install-libLTLIBRARIES install-dbusincludeHEADERS install-nodist_dbusarchincludeHEADERS && \ $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk index 531965b28d..b811f84a38 100644 --- a/depends/packages/expat.mk +++ b/depends/packages/expat.mk @@ -20,3 +20,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/fontconfig.mk b/depends/packages/fontconfig.mk index d0996b4534..293631739d 100644 --- a/depends/packages/fontconfig.mk +++ b/depends/packages/fontconfig.mk @@ -26,3 +26,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk index a98e82ed16..f24fc69d81 100644 --- a/depends/packages/freetype.mk +++ b/depends/packages/freetype.mk @@ -20,3 +20,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/libX11.mk b/depends/packages/libX11.mk index a013da5192..ea461196f2 100644 --- a/depends/packages/libX11.mk +++ b/depends/packages/libX11.mk @@ -25,3 +25,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/libXau.mk b/depends/packages/libXau.mk index ce42140689..0e4a60ad25 100644 --- a/depends/packages/libXau.mk +++ b/depends/packages/libXau.mk @@ -25,3 +25,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/libXext.mk b/depends/packages/libXext.mk index d94f49f3be..5b09792318 100644 --- a/depends/packages/libXext.mk +++ b/depends/packages/libXext.mk @@ -24,3 +24,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk index 5f622f8e6e..a3ade899b7 100644 --- a/depends/packages/libevent.mk +++ b/depends/packages/libevent.mk @@ -27,4 +27,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds + rm lib/*.la endef diff --git a/depends/packages/libxcb.mk b/depends/packages/libxcb.mk index 3ddd5a7dd9..9402951826 100644 --- a/depends/packages/libxcb.mk +++ b/depends/packages/libxcb.mk @@ -32,5 +32,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm -rf share/man share/doc + rm -rf share/man share/doc lib/*.la endef diff --git a/depends/packages/protobuf.mk b/depends/packages/protobuf.mk index d201d1183f..52975b14ec 100644 --- a/depends/packages/protobuf.mk +++ b/depends/packages/protobuf.mk @@ -30,5 +30,5 @@ define $(package)_stage_cmds endef define $(package)_postprocess_cmds - rm lib/libprotoc.a + rm lib/libprotoc.a lib/*.la endef diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk index 313e4adf2a..56681b52a1 100644 --- a/depends/packages/qrencode.mk +++ b/depends/packages/qrencode.mk @@ -24,3 +24,7 @@ endef define $(package)_stage_cmds $(MAKE) DESTDIR=$($(package)_staging_dir) install endef + +define $(package)_postprocess_cmds + rm lib/*.la +endef diff --git a/depends/packages/zeromq.mk b/depends/packages/zeromq.mk index dfbc50580c..e69a37e093 100644 --- a/depends/packages/zeromq.mk +++ b/depends/packages/zeromq.mk @@ -31,5 +31,5 @@ endef define $(package)_postprocess_cmds sed -i.old "s/ -lstdc++//" lib/pkgconfig/libzmq.pc && \ - rm -rf bin share + rm -rf bin share lib/*.la endef |