aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2024-03-22 16:50:40 +0000
committerfanquake <fanquake@gmail.com>2024-03-25 10:51:45 +0000
commit76045bb9d6808931cd0f2933203b5b611e032ec8 (patch)
treee5f4f7999d143863d74f24283860493c2008e7f3 /depends
parentd04623678c70ff58a20fb5c35d33cb8f483f1efb (diff)
downloadbitcoin-76045bb9d6808931cd0f2933203b5b611e032ec8.tar.xz
depends: always set CMAKE_POSITION_INDEPENDENT_CODE=ON
Rather than potentially having to set this per-package, set it globally, as this should always be what we want. Without doing this, changes in later commits will have to add this per-package. Similar to https://github.com/bitcoin/bitcoin/pull/29488, which is the Autotools equivalent.
Diffstat (limited to 'depends')
-rw-r--r--depends/funcs.mk1
-rw-r--r--depends/packages.md2
-rw-r--r--depends/packages/libmultiprocess.mk1
3 files changed, 2 insertions, 2 deletions
diff --git a/depends/funcs.mk b/depends/funcs.mk
index 0d3bc2c526..494ed5d324 100644
--- a/depends/funcs.mk
+++ b/depends/funcs.mk
@@ -181,6 +181,7 @@ $(1)_cmake=env CC="$$($(1)_cc)" \
LDFLAGS="$$($(1)_ldflags)" \
cmake -DCMAKE_INSTALL_PREFIX:PATH="$$($($(1)_type)_prefix)" \
-DCMAKE_INSTALL_LIBDIR=lib/ \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
$$($(1)_config_opts)
ifeq ($($(1)_type),build)
$(1)_cmake += -DCMAKE_INSTALL_RPATH:PATH="$$($($(1)_type)_prefix)/lib"
diff --git a/depends/packages.md b/depends/packages.md
index c288032766..0ffdc66d48 100644
--- a/depends/packages.md
+++ b/depends/packages.md
@@ -163,7 +163,7 @@ From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assura
> ecosystem, as it leads to a massive number of unnecessary rebuilds.
Where possible, packages are built with Position Independant Code. Either using
-the autotools `--with-pic` flag, or `DCMAKE_POSITION_INDEPENDENT_CODE` with CMake.
+the Autotools `--with-pic` flag, or `CMAKE_POSITION_INDEPENDENT_CODE` with CMake.
## Secondary dependencies:
diff --git a/depends/packages/libmultiprocess.mk b/depends/packages/libmultiprocess.mk
index 03527100d4..765d649377 100644
--- a/depends/packages/libmultiprocess.mk
+++ b/depends/packages/libmultiprocess.mk
@@ -9,7 +9,6 @@ $(package)_dependencies += native_capnp
endif
define $(package)_set_vars :=
-$(package)_config_opts += -DCMAKE_POSITION_INDEPENDENT_CODE=ON
ifneq ($(host),$(build))
$(package)_config_opts := -DCAPNP_EXECUTABLE="$$(native_capnp_prefixbin)/capnp"
$(package)_config_opts += -DCAPNPC_CXX_EXECUTABLE="$$(native_capnp_prefixbin)/capnpc-c++"