Skip to content

Commit

Permalink
Merge #6293: backport: cmake prereqs 1
Browse files Browse the repository at this point in the history
801c4fc build: followup to 29488 applied to gmp (pasta)
4b704a6 Merge bitcoin/bitcoin#28627: depends: zeromq 4.3.5 (fanquake)
0e6cb98 Merge bitcoin/bitcoin#26421: build: copy config.{guess,sub} post autogen in zmq package (fanquake)
cd33b69 Merge bitcoin/bitcoin#29488: depends: always configure with `--with-pic` (fanquake)
1b88674 Merge bitcoin/bitcoin#29287: depends: Do not override `CFLAGS` when building SQLite with `DEBUG=1` (fanquake)
f50fb6e Merge bitcoin/bitcoin#26998: depends: ensure we are appending to sqlite cflags (Andrew Chow)
25a594f Merge bitcoin/bitcoin#25987: build: compile depends sqlite with more recommended options (Andrew Chow)
d725c58 Merge bitcoin/bitcoin#27312: depends: qrencode 4.1.1 (fanquake)
482e5bb Merge bitcoin/bitcoin#27462: depends: fix compiling bdb with clang-16 on aarch64 (fanquake)
f0a53c9 Merge bitcoin/bitcoin#26994: depends: define `__BSD_VISIBLE` for FreeBSD bdb build (merge-script)
b1ac992 Merge bitcoin/bitcoin#26073: build: fix depends bdb compilation for BSDs (fanquake)
45e0f6e Merge bitcoin/bitcoin#25763: bdb: disable Werror for format-security (fanquake)

Pull request description:

  ## Issue being fixed or feature implemented
  First batch of PRs which lead towards cmake, focusing on having nothing or very little done out of order / with significant conflicts

  ## What was done?
  batch of 11 backports which lead towards cmake

  ## How Has This Been Tested?
  Built locally, seems to work, let's see CI

  ## Breaking Changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 801c4fc
  knst:
    utACK  801c4fc

Tree-SHA512: b8b5299da9d82ab485ba5141ea12ba5c606f1a783b34c957d61e0a68d45865754fbc8bcbb0c5eabe3d410ff6262ce26789cf4a3af696905f7b7908e523c97816
  • Loading branch information
PastaPastaPasta committed Sep 27, 2024
2 parents 8e32dd8 + 801c4fc commit 3b9f935
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 94 deletions.
2 changes: 1 addition & 1 deletion depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ $(1)_stage_env+=PATH=$(build_prefix)/bin:$(PATH)
# config.guess, which is what we set it too here. This also quells autoconf
# warnings, "If you wanted to set the --build type, don't use --host.",
# when using versions older than 2.70.
$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
$(1)_autoconf=./configure --build=$(BUILD) --host=$($($(1)_type)_host) --prefix=$($($(1)_type)_prefix) --with-pic $$($(1)_config_opts) CC="$$($(1)_cc)" CXX="$$($(1)_cxx)"
ifneq ($($(1)_nm),)
$(1)_autoconf += NM="$$($(1)_nm)"
endif
Expand Down
3 changes: 3 additions & 0 deletions depends/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ From the [Gentoo Wiki entry](https://wiki.gentoo.org/wiki/Project:Quality_Assura
> creates. This leads to massive overlinking, which is toxic to the Gentoo
> 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.

## Secondary dependencies:

Secondary dependency packages relative to the bitcoin binaries/libraries (i.e.
Expand Down
10 changes: 4 additions & 6 deletions depends/packages/bdb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ $(package)_patches=clang_cxx_11.patch
define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication --enable-option-checking
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cflags+=-Wno-error=implicit-function-declaration
$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security -Wno-error=implicit-int
$(package)_cxxflags+=-std=c++17
$(package)_cppflags_freebsd=-D_XOPEN_SOURCE=600 -D__BSD_VISIBLE=1
$(package)_cppflags_netbsd=-D_XOPEN_SOURCE=600
$(package)_cppflags_openbsd=-D_XOPEN_SOURCE=600
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
endef

Expand Down
1 change: 0 additions & 1 deletion depends/packages/expat.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared --without-docbook --without-tests --without-examples
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
$(package)_config_opts += --without-xmlwf
$(package)_config_opts_linux=--with-pic
$(package)_cppflags += -D_DEFAULT_SOURCE
endef

Expand Down
1 change: 0 additions & 1 deletion depends/packages/freetype.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ $(package)_sha256_hash=8bee39bd3968c4804b70614a0a3ad597299ad0e824bc8aad5ce8aaf48
define $(package)_set_vars
$(package)_config_opts=--without-zlib --without-png --without-harfbuzz --without-bzip2 --disable-static
$(package)_config_opts += --enable-option-checking --without-brotli
$(package)_config_opts_linux=--with-pic
endef

define $(package)_config_cmds
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/gmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $(package)_file_name=gmp-$($(package)_version).tar.bz2
$(package)_sha256_hash=eae9326beb4158c386e39a356818031bd28f3124cf915f8c5b1dc4c7a36b4d7c

define $(package)_set_vars
$(package)_config_opts+=--enable-cxx --enable-fat --with-pic --disable-shared
$(package)_config_opts+=--enable-cxx --enable-fat --disable-shared
$(package)_cflags_armv7l_linux+=-march=armv7-a
$(package)_cflags_aarch64_darwin+=-march=armv8-a
endef
Expand Down
1 change: 0 additions & 1 deletion depends/packages/libXau.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ $(package)_dependencies=xproto
define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-lint-library --without-lint
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
$(package)_config_opts_linux=--with-pic
endef

define $(package)_preprocess_cmds
Expand Down
5 changes: 0 additions & 5 deletions depends/packages/libevent.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-openssl --disable-libevent-regress --disable-samples
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
$(package)_config_opts_release=--disable-debug-mode
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cppflags_mingw32=-D_WIN32_WINNT=0x0601
endef

Expand Down
1 change: 0 additions & 1 deletion depends/packages/libxcb_util.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ $(package)_dependencies=libxcb
define $(package)_set_vars
$(package)_config_opts = --disable-shared --disable-devel-docs --without-doxygen
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
$(package)_config_opts += --with-pic
endef

define $(package)_preprocess_cmds
Expand Down
9 changes: 4 additions & 5 deletions depends/packages/qrencode.mk
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package=qrencode
$(package)_version=3.4.4
$(package)_version=4.1.1
$(package)_download_path=https://fukuchi.org/works/qrencode/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5
$(package)_sha256_hash=e455d9732f8041cf5b9c388e345a641fd15707860f928e94507b1961256a6923

define $(package)_set_vars
$(package)_config_opts=--disable-shared --without-tools --without-tests --disable-sdltest
$(package)_config_opts=--disable-shared --without-tools --without-tests --without-png
$(package)_config_opts += --disable-gprof --disable-gcov --disable-mudflap
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cflags += -Wno-int-conversion -Wno-implicit-function-declaration
endef

define $(package)_preprocess_cmds
Expand Down
11 changes: 7 additions & 4 deletions depends/packages/sqlite.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ $(package)_sha256_hash=5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373

define $(package)_set_vars
$(package)_config_opts=--disable-shared --disable-readline --disable-dynamic-extensions --enable-option-checking
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts+= --disable-rtree --disable-fts4 --disable-fts5
# We avoid using `--enable-debug` because it overrides CFLAGS, a behavior we want to prevent.
$(package)_cflags_debug += -g
$(package)_cppflags_debug += -DSQLITE_DEBUG
$(package)_cppflags+=-DSQLITE_DQS=0 -DSQLITE_DEFAULT_MEMSTATUS=0 -DSQLITE_OMIT_DEPRECATED
$(package)_cppflags+=-DSQLITE_OMIT_SHARED_CACHE -DSQLITE_OMIT_JSON -DSQLITE_LIKE_DOESNT_MATCH_BLOBS
$(package)_cppflags+=-DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_AUTOINIT
endef

define $(package)_preprocess_cmds
Expand Down
16 changes: 5 additions & 11 deletions depends/packages/zeromq.mk
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
package=zeromq
$(package)_version=4.3.4
$(package)_version=4.3.5
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=c593001a89f5a85dd2ddf564805deb860e02471171b3f204944857336295c3e5
$(package)_patches=remove_libstd_link.patch netbsd_kevent_void.patch
$(package)_sha256_hash=6653ef5910f17954861fe72332e68b03ca6e4d9c7160eb3a8de5a5a913bfab43
$(package)_patches=remove_libstd_link.patch

define $(package)_set_vars
$(package)_config_opts = --without-docs --disable-shared --disable-valgrind
$(package)_config_opts += --disable-perf --disable-curve-keygen --disable-curve --disable-libbsd
$(package)_config_opts += --without-libsodium --without-libgssapi_krb5 --without-pgm --without-norm --without-vmci
$(package)_config_opts += --disable-libunwind --disable-radix-tree --without-gcov --disable-dependency-tracking
$(package)_config_opts += --disable-Werror --disable-drafts --enable-option-checking
$(package)_config_opts_linux=--with-pic
$(package)_config_opts_freebsd=--with-pic
$(package)_config_opts_netbsd=--with-pic
$(package)_config_opts_openbsd=--with-pic
$(package)_config_opts_android=--with-pic
$(package)_cxxflags+=-std=c++17
endef

define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch && \
patch -p1 < $($(package)_patch_dir)/netbsd_kevent_void.patch && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config
patch -p1 < $($(package)_patch_dir)/remove_libstd_link.patch
endef

define $(package)_config_cmds
./autogen.sh && \
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub config && \
$($(package)_autoconf)
endef

Expand Down
57 changes: 0 additions & 57 deletions depends/patches/zeromq/netbsd_kevent_void.patch

This file was deleted.

0 comments on commit 3b9f935

Please sign in to comment.