Skip to content

Commit 5560741

Browse files
committed
Merge bitcoin/bitcoin#29488: depends: always configure with --with-pic
e037c4f depends: always configure with --with-pic (fanquake) Pull request description: We currently do this sporadically. Not only amongst packages, but across OS's, i.e sometimes it's done for BSDs/Android, and sometimes not. Configure with `--with-pic` globally instead. I think this generally makes more sense, and should not have any downsides. See related discussion in bitcoin/bitcoin#28846 (comment). ACKs for top commit: hebasto: ACK e037c4f. Tree-SHA512: efc743ff92f9f99f3ac16514e98363ad395c6f956cd4be7e785b5c573685baf7fcd68c51d6a705ee8761fc676eb045b7e61676595be0eb0f70f34e99174cddc0
2 parents f22bca6 + e037c4f commit 5560741

File tree

11 files changed

+4
-26
lines changed

11 files changed

+4
-26
lines changed

depends/funcs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ $(1)_stage_env+=PATH="$(build_prefix)/bin:$(PATH)"
147147
# config.guess, which is what we set it too here. This also quells autoconf
148148
# warnings, "If you wanted to set the --build type, don't use --host.",
149149
# when using versions older than 2.70.
150-
$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
150+
$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) --with-pic $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
151151
ifneq ($($(1)_nm),)
152152
$(1)_autoconf += NM="$$($(1)_nm)"
153153
endif

depends/packages.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assura
162162
> creates. This leads to massive overlinking, which is toxic to the Gentoo
163163
> ecosystem, as it leads to a massive number of unnecessary rebuilds.
164164
165+
Where possible, packages are built with Position Independant Code. Either using
166+
the autotools `--with-pic` flag, or `DCMAKE_POSITION_INDEPENDENT_CODE` with CMake.
167+
165168
## Secondary dependencies:
166169

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

depends/packages/bdb.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ $(package)_patches=clang_cxx_11.patch
99
define $(package)_set_vars
1010
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication --enable-option-checking
1111
$(package)_config_opts_mingw32=--enable-mingw
12-
$(package)_config_opts_linux=--with-pic
13-
$(package)_config_opts_freebsd=--with-pic
14-
$(package)_config_opts_netbsd=--with-pic
15-
$(package)_config_opts_openbsd=--with-pic
16-
$(package)_config_opts_android=--with-pic
1712
$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int
1813
$(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 -D__BSD_VISIBLE=1
1914
$(package)_cppflags_netbsd=-D_XOPEN_SOURCE=600

depends/packages/expat.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ define $(package)_set_vars
1111
$(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples
1212
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
1313
$(package)_config_opts += --without-xmlwf
14-
$(package)_config_opts_linux=--with-pic
1514
$(package)_cppflags += -D_DEFAULT_SOURCE
1615
endef
1716

depends/packages/freetype.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ $(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48
77
define $(package)_set_vars
88
$(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static
99
$(package)_config_opts += --enable-option-checking --without-brotli
10-
$(package)_config_opts_linux=--with-pic
1110
endef
1211

1312
define $(package)_config_cmds

depends/packages/libXau.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ $(package)_dependencies=xproto
1010
define $(package)_set_vars
1111
$(package)_config_opts=--disable-shared --disable-lint-library --without-lint
1212
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
13-
$(package)_config_opts_linux=--with-pic
1413
endef
1514

1615
define $(package)_preprocess_cmds

depends/packages/libevent.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ define $(package)_set_vars
1111
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
1212
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
1313
$(package)_config_opts_release=--disable-debug-mode
14-
$(package)_config_opts_linux=--with-pic
15-
$(package)_config_opts_freebsd=--with-pic
16-
$(package)_config_opts_netbsd=--with-pic
17-
$(package)_config_opts_openbsd=--with-pic
18-
$(package)_config_opts_android=--with-pic
1914
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
2015

2116
ifeq ($(NO_HARDEN),)

depends/packages/libxcb_util.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ $(package)_dependencies=libxcb
88
define $(package)_set_vars
99
$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen
1010
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
11-
$(package)_config_opts += --with-pic
1211
endef
1312

1413
define $(package)_preprocess_cmds

depends/packages/qrencode.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ define $(package)_set_vars
88
$(package)_config_opts=--disable-shared --without-tools --without-tests --without-png
99
$(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap
1010
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
11-
$(package)_config_opts_linux=--with-pic
12-
$(package)_config_opts_android=--with-pic
1311
$(package)_cflags += -Wno-int-conversion -Wno-implicit-function-declaration
1412
endef
1513

depends/packages/sqlite.mk

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ $(package)_sha256_hash=5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373
77
define $(package)_set_vars
88
$(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking
99
$(package)_config_opts+= --disable-rtree --disable-fts4 --disable-fts5
10-
$(package)_config_opts_linux=--with-pic
11-
$(package)_config_opts_freebsd=--with-pic
12-
$(package)_config_opts_netbsd=--with-pic
13-
$(package)_config_opts_openbsd=--with-pic
1410
# We avoid using `--enable-debug` because it overrides CFLAGS, a behavior we want to prevent.
1511
$(package)_cflags_debug += -g
1612
$(package)_cppflags_debug += -DSQLITE_DEBUG

0 commit comments

Comments
 (0)