Commit Graph

55 Commits

Author SHA1 Message Date
Pasta
4bba7ab2ff
build: upgrade depends Boost to 1.77.0
This primarily improves support for external signing, as it includes
multiple bugfixes for Boost Process. As well as various improvements to
the multi-index library.
2022-02-22 15:53:45 +00:00
fanquake
2037a3b6c1
build: header-only Boost 2022-02-13 20:59:07 +00:00
fanquake
39e66e938f
build: use header-only Boost unit test 2022-02-13 20:59:02 +00:00
fanquake
25a91a571a
Merge bitcoin/bitcoin#24276: build, refactor: Improve package version usage
edc9a6afdc build, refactor: Reuse expat package version in its download path (Hennadii Stepanov)
4bb7821ab2 build, refactor: Use conventional version notation for boost package (Hennadii Stepanov)

Pull request description:

  `boost` package:
  - `.` is used as a separator in versions of other depends packages.

  `expat` package:
  - reuse package version in its download path

  ---

  The straightforward way to verify this PR:
  ```
  $ cd depends
  $ make clean-all
  $ make boost_fetched
  $ make expat_fetched
  ```

ACKs for top commit:
  prusnak:
    ACK edc9a6a
  shaavan:
    ACK edc9a6afdc

Tree-SHA512: c15d672fe34ac59850425d3d6a6eee5f720e16d227aad1332a563b218465879b7ee6fb865dd1bac06aedf356f9bb1c67112d9d88da8f877f04838b50a9dc97be
2022-02-13 11:22:36 +00:00
fanquake
471d15536f
build: add support for OpenBSD to depends 2022-02-10 12:33:10 +00:00
Hennadii Stepanov
4bb7821ab2
build, refactor: Use conventional version notation for boost package
Dot is used as a separator in versions of other depends packages.
2022-02-06 13:15:00 +02:00
fanquake
07269321f3
build: remove Boost::system usage 2022-02-03 18:35:52 +08:00
Kiminuo
b87f9c5edf
build: remove boost::filesystem usage 2022-02-03 18:35:52 +08:00
laanwj
c545a7aeb1
Merge bitcoin/bitcoin#23948: build: add support for FreeBSD to depends
ae9175f608 build: add FreeBSD support to depends (fanquake)

Pull request description:

  Setup to use the system Clang (11.0.1 as of FreeBSD 13.0).

  Doesn't build the Qt package; that requires a few additional changes. The current issue is that FreeBSDs `byacc` seems to have an issue parsing something in libxkbcommon. Work in progress branch here: https://github.com/fanquake/bitcoin/tree/depends_support_freebsd_qt. In any case, I don't think building the Qt libs on FreeBSD is a super high priority (I'd also have no way to test the GUI).

ACKs for top commit:
  laanwj:
    ACK ae9175f608

Tree-SHA512: 1ecc7855f0195f68c96e534bd77ce17c3975db1dfb3caa35302c2b46643c8c30f75b1c2e1735cf69f1eddb70447d11e67e7f339ef5497336cdff7a59b32be961
2022-02-02 20:00:53 +01:00
fanquake
ae9175f608
build: add FreeBSD support to depends 2022-01-19 20:38:07 +08:00
fanquake
e13f8f775d
build: build x86_64 Linux Boost with -fcf-protection=full
This is required so that we can test for control flow in our ELF
security checks. Otherwise test_bitcoin will fail, as it has a main that
is provided by Boost, and wont have been built with
-fcf-protection=full.

While here simplify to using -fcf-protection for all x86_64 builds.
2022-01-04 22:45:44 +08:00
fanquake
0445e1a1a5
build: use -fcf-protection=full when building Windows Boost in depends 2021-11-17 16:12:47 +08:00
fanquake
e734847c1f
build: remove duplicate -fvisibility=hidden from Boost build
Boost already sets this by default.
2021-11-12 19:04:35 +08:00
fanquake
32659e5897
build: don't install Boost cmake config files 2021-11-12 19:04:22 +08:00
fanquake
76f031b050
build: fix unoptimized libraries in depends
We need to append-to rather than set CXXFLAGS, otherwise we loose -O2 &
-pipe. Currently this results in zeromq being built without optimizations
at all (or whatever the compiler would default too, essentially always -O0).

Bdb is the same, for the CXX portion of its code. C code has been built
with -O2.

Boost has actually been uneffected because it receives -O3 from it's own
build flags.
2021-08-31 11:43:48 +08:00
fanquake
3caedb4c03
build: don't use cf-protection when targeting arm-apple-darwin
After two reports on IRC of issues building depends on an Apple M1
machine, it turns out that this option can't be used when targeting
arm-apple-darwin. For now, just use it for x86_64-apple-darwin.

```bash
Apple clang version 12.0.5 (clang-1205.0.22.9)
Target: x86_64-apple-darwin20.4.0

error: option 'cf-protection=return' cannot be specified on this target
error: option 'cf-protection=branch' cannot be specified on this target
2 errors generated.
```
2021-05-26 13:08:16 +08:00
fanquake
469a5bc4fa
build: build Boost with -fcf-protection when targeting Darwin
The LLVM Clang we use for cross-compilation supports this option, and it's expected
that any builders on macOS will also be using an Apple Clang that supports it.
2021-05-09 13:38:48 +08:00
fdov
36c10b9f4b
build,boost: update download url.
- bintray is closing.
    - updated to jfrog.io.
2021-04-12 20:11:11 +02:00
fanquake
06e1d7d81d
build: don't build or use Boost Thread 2021-02-02 12:38:22 +08:00
fanquake
2e1336dbfe
Merge #20471: build: use C++17 in depends
2f5dfe4a7f depends: build qt in c++17 mode (fanquake)
104e859c97 builds: don't pass -silent to qt when building in debug mode (fanquake)
e2c500636c depends: build zeromq with -std=c++17 (fanquake)
2374f2fbef depends: build Boost with -std=c++17 (fanquake)
2dde55702d depends: build bdb with -std=c++17 (fanquake)

Pull request description:

  In packages where we are passing `-std=c++11` switch to `-std=c++17`, or, `-std=c++1z` in the case of Qt.

  This PR also contains a [commit](104e859c97) that improves debug output when building Qt for debugging (`DEBUG=1`).

  Now we'll get output like this:
  ```bash
  g++ -c -pipe -ffunction-sections -O2 -fPIC -std=c++11 -fno-exceptions <lots more> ../../corelib/kernel/qcoreapplication.cpp
  ```
  rather than just:
  ```bash
  compiling ../../corelib/kernel/qcoreapplication.cpp
  ```

  Note that when you look at the DEBUG output for these changes when building Qt, you'll see objects being compiled with a mix of C++11 and C++17. The breakdown is roughly:

  1. `qmake` built with `-std=c++11`:
  ```bash
  Creating qmake...
  make[1]: Entering directory '<trim>/qt/5.9.8-4110fa99945/qtbase/qmake'
  g++ -c -o project.o   -std=c++11 -ffunction-sections -O2 -g <trim> <trim>/qt/5.9.8-4110fa99945/qtbase/qmake/project.cpp

  # when qmake, Qt also builds some of it's corelib, such as corelib/global/qmalloc.cpp
  g++ -c -o qmalloc.o   -std=c++11 -ffunction-sections -O2 -g <trim> <trim>/qt/5.9.8-4110fa99945/qtbase/src/corelib/global/qmalloc.cpp
  ```

  2. `qmake` is run, and passed our build options, including `-c++std`:
  ```bash
  make[1]: Entering directory '<trim>/qt/5.9.8-4110fa99945/qtbase'
  <trim>qt/5.9.8-4110fa99945/qtbase/bin/qmake -o Makefile qtbase.pro -- -bindir <trim>/native/bin -c++std c++1z -confirm-license <trim>
  ```

  3. After some cleaning and configuring, we actually start to build Qt, as well as it's tools and internal libs:
  ```bash
  Building qt...
  make[1]: Entering directory '<trim>/qt/5.9.8-4110fa99945/qtbase/src'

  # build libpng, zlib etc
  gcc -c -m64 -pipe -pipe -O1 <trim> -o .obj/png.o png.c

  # build libQt5Bootstrap, using C++11, which again compiles qmalloc.cpp
  make[2]: Entering directory '<trim>/qt/5.9.8-4110fa99945/qtbase/src/tools/bootstrap'
  g++ -c -pipe -ffunction-sections -O2 -fPIC -std=c++11 <trim> -o .obj/qmalloc.o ../../corelib/global/qmalloc.cpp

  # build a bunch of tools like moc, rcc, uic, qfloat16-tables, qdbuscpp2xml, using C++11
  g++ -c -pipe -O2 -std=c++11 -fno-exceptions -Wall -W <trim> -o .obj/rcc.o rcc.cpp

  # from here, Qt is compiled with -std=c++1z, including qmalloc.cpp, for the third and final time:
  g++ -c -include .pch/Qt5Core <trim> -g -Og -fPIC -std=c++1z -fvisibility=hidden <trim> -o .obj/qmalloc.o global/qmalloc.cpp
  ```

  4.  Finally, build tools like `lrelease`, `lupdate`, etc, but back to using -std=c++11
  ```bash
  make[1]: Entering directory '<trim>/qt/5.9.8-4110fa99945/qttools/src/linguist/lrelease'
  g++ -c -pipe -O2 -std=c++11 -fno-exceptions -Wall -W <trim> -o .obj/translator.o ../shared/translator.cpp
  ```

  If you dump the debug info from the built Qt libs, they should also tell you that they were compiled with `C++17`:
  ```bash
  objdump -g bitcoin/depends/x86_64-pc-linux-gnu/lib/libQt5Core.a
  GNU C++17 9.3.0 -m64 -mtune=generic -march=x86-64 -g -O1 -Og -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fasynchronous-unwind-tables -fstack-protector-strong -fstack-clash-protection -fcf-protection
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 2f5dfe4a7f
  practicalswift:
    cr ACK 2f5dfe4a7f: patch looks correct
  fjahr:
    Code review ACK 2f5dfe4a7f
  hebasto:
    ACK 2f5dfe4a7f, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: fc5e9d7c7518c68349c8228fb1aead829850373efc960c9b8c079096a83d1dad19c62a9730fce5802322bf07e320960fd47851420d429eda0a87c307f4e8b03a
2020-11-30 12:23:23 +08:00
fanquake
2374f2fbef
depends: build Boost with -std=c++17 2020-11-24 10:17:35 +08:00
Carl Dong
f190343c96
depends: boost: Specify cflags+compileflags 2020-11-23 15:50:59 -05:00
Carl Dong
b2328b7989
depends: boost: Remove unnecessary _archiver_
We already have $(package)_ar, so just use that instead
2020-11-23 15:50:58 -05:00
Carl Dong
ab9e047cc2
depends: boost: Cleanup toolset selection 2020-11-23 15:50:57 -05:00
Carl Dong
86002e7e90
depends: boost: Cleanup architecture/address-model 2020-11-23 15:50:56 -05:00
Carl Dong
d7048fa73f
depends: boost: Disable all compression 2020-11-23 15:50:55 -05:00
Carl Dong
9cf2ee54d3
depends: boost: Split into non-/native packages 2020-11-23 15:50:54 -05:00
Carl Dong
a57b498560
depends: boost: Bump to 1.71.0 2020-11-23 15:50:53 -05:00
Carl Dong
800655ff31
depends: boost: Refer to version in URL 2020-11-23 15:50:52 -05:00
fanquake
335bd7f8bc
build: use patch rather than sed in Boost package
The depends comment is actually incorrect, and this can be dropped once
we move to 1.71.0 or later.
2020-08-25 13:19:56 +08:00
Sjors Provoost
8314c23d7b
[depends] boost: patch unused variable in boost_process
Co-Authored-By: fanquake <fanquake@gmail.com>
2020-07-31 13:38:09 +02:00
Carl Dong
0a33803f1c
depends: boost: Use clang toolset if clang in CXX 2020-05-27 17:39:51 -04:00
Carl Dong
1ce74bcde3
depends: boost: Split target-os from toolset
Previously, we specified the target-os in the toolset (and sometimes
used the wrong command line flags), now we have a clear separation,
which is favored by ./bootstrap.sh and ./b2.

This means that all supported OSes will specify the correct target-os=
and toolset= on the command line.
2020-05-27 17:39:49 -04:00
Carl Dong
2d4e480813
depends: boost: Specify toolset to bootstrap.sh
b2 will pickup our user-config.jam just fine, however, bootstrap.sh has
its own toolset autodetect mechanism, which doesn't GAF about our
user-config.jam
2020-05-27 17:39:48 -04:00
Russell Yanofsky
603fd6a2e7 depends: add MULTIPROCESS depends option
Builds required packages and passes --enable-multiprocess option to bitcoin build
2020-05-12 09:47:06 -04:00
MarcoFalke
f29bd546ec Revert "Merge #16367: Multiprocess build support"
This reverts the changes made in merge commit
1b30761360:

This reverts commit b919efadff.
This reverts commit d54f64c6c7.
This reverts commit 787f40668d.
This reverts commit d630646662.
This reverts commit e6e44eedd5.
2020-04-10 19:38:21 -04:00
Russell Yanofsky
d630646662 libmultiprocess depends build 2020-04-05 21:48:21 -04:00
fanquake
1d0a87e712
build: remove chrono package from depends Boost 2020-03-07 08:34:30 +08:00
Peter Bushnell
22c5a986e9
depends: Consistent use of package variable
All other mk files use the package variable consistently except for the two instances here, which have always been here, since depends was introduced in 0.10.
2020-01-16 13:23:02 +00:00
Wladimir J. van der Laan
91fbcf41b3
Merge #16110: depends: Add Android NDK support
f9af3ced1c Android: add all arch support (Block Mechanic)
d419ca7e32 depends: export dynamic JNI symbols from static qtforandroid.a (Igor Cota)
ed30684d03 Qt: patch androidjnimain.cpp to make sure JNI is initialised when statically compiled (Igor Cota)
e4c319e8a1 builds: remove superfluous config_opts_aarch64_android (Igor Cota)
24ffef0c27 Patch libevent when building for Android (fix arc4random_addrandom) (Igor Cota)
f1e40b3e71 Update bitcoin_qt.m4 (BlockMechanic)
b4057d8261 Define TARGET_OS when host is android (Igor Cota)
80b475f159 Fix Android zlib cross compilation issue (https://stackoverflow.com/questions/21396988/zlib-build-not-configuring-properly-with-cross-compiler-ignores-ar) (Igor Cota)
45f8219015 Add full Android build example command and instructions on getting SDK/NDK (Igor Cota)
b68f2a68c2 Add config opts and patch for aarch64_android build of Qt (Igor Cota)
9c4cb0166e Add ranlib to android.mk hosts file (fix OSX Android NDK build) (Igor Cota)
c2a749c9c1 Add example Android host-platform-triplet and options (Igor Cota)
0b0cff3c61 Add support for building Android dependencies (Igor Cota)

Pull request description:

  This allows one to build the dependencies with the Android SDK and goes towards fixing #11844. It has been tested to work with:
  `make HOST=aarch64-linux-android ANDROID_API_LEVEL=28 ANDROID_TOOLCHAIN_BIN=/home/user/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin NO_QT=1 NO_WALLET=1`

ACKs for top commit:
  Sjors:
    ACK f9af3ce. I'm OK with merging and then improving later.

Tree-SHA512: cb805115ebe5c9e33db2bf3eab8628808fe3f50052053d8877d8b8e4406d6fea1ed9e5c4dff85d777fb99c81be6ffb9d95a0e6d32344e728e5e0da6c653e2ce7
2019-11-04 13:32:19 +01:00
Cory Fields
50037e97d1 depends: fix boost mac cross build with clang 9+
The ancient "darwin-4.9.1" profile has long been used to match against
clang, which prior to version 9, reported 4.9.1 as its version when
invoking "clang++ -dumpversion". Presumably this was a historical
compatibility quirk related to Apple's switch from gcc to clang.

This was "fixed" in clang 9.0, so that -dumpversion reports the real
version. Unfortunately that had the side-effect of breaking the
(brittle) boost compiler detection.

Move to the seemingly more-correct "clang-darwin" profile, which passes
the checks and builds correctly.

Also switch to using ar rather than libtool for archiving, as it's what
the clang-darwin profile expects to be using.

Note that because this is using a different profile, some of the final
command-line arguments end up changing. The changes look sane at a
glance.
2019-10-23 14:02:39 -04:00
Block Mechanic
f9af3ced1c Android: add all arch support
Add support for armv7a, i686 and x86_64 archs to android.mk
Add -fPIC to depends file as anddroid requires it see https://stackoverflow.com/questions/30498776/position-independent-executables-and-android
2019-10-18 22:24:21 +02:00
Sjors Provoost
2620e24b83
[depends] boost: update to 1.70 2019-05-03 13:22:17 +01:00
Chun Kuan Lee
f447a0a707 Remove program options from build system 2018-07-18 02:48:34 +00:00
fanquake
d78269ac99
[depends] Boost 1.64.0 2017-05-03 18:19:07 +08:00
fanquake
4ed6faf381
[depends] Boost 1.63.0 2017-01-11 08:44:22 +08:00
fanquake
16f8823088
[depends] Boost 1.61.0 2016-09-27 10:34:54 +08:00
Cory Fields
a398549b3b depends: use c++11 2016-04-27 12:47:41 +02:00
fanquake
9e940fa4c6 [depends] Boost 1.59.0 2015-11-10 23:23:33 +08:00
Cory Fields
4bdad99f50 depends: bump boost to 1.58.0 2015-07-03 12:59:13 -04:00