Commit graph

534 commits

Author SHA1 Message Date
Ross Nicoll b2554af0df Bitcoin Core 0.21.2 release candidate 2
Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEz7FuIclQ9n+pXlWPLuufXMCVJsEFAmEp9EoACgkQLuufXMCV
 JsGvcQ//ZSQOCEFH3e+gBuXHthXG2UZsHagC715ruQquhRt4aOKiFLu/eJGwiKBt
 Frc1wLF21dgtl/2JUtVBpVb54whni1PKgDowtkk4Ge7gWM0awW2OnvdgA21E+syD
 501duaW6ORvo5icmf7uPQ7u/g9Ks1s1chBr1bLnYqqqg2e3/aqC4+drTjd8wziy3
 J+8Bzc+KLAklgv8cIpH1EDuFGrumlMYxW0KHqJeN7Vk8wGX8PINrkEGCyrBDQ7DY
 BEd6txwcivPxqMfj61OP60DU0oG6IVECGMPrANtyK+ba0FHl+GkNQuTaX8zv4Ik9
 dKscJ1OiRX2ER/pEJTwg8PJfOET5D/WRc1xSmrYBOK7cFLtYVqH2yvnHiLlWvH1P
 7TQOAjfzQwa+yUnGRf2dWW+Rngv876JjBUX5vbm4UC5Geo8Bdl3z9U9glaq03fVd
 3Q8uAgljLnXWFiylK9oDYhsFfWSUYgjyhM11LCb5K3y3t7ageclu6RTl574jy5sb
 8qBwQxpJt5UtwIK2SNqq1iDmMW3J65sb3CmTND9ppDA79GfZzwlvGVwO1bN2TC6m
 0dGTPvOPWS9x/PSq8+8o1uCHDzHrW9B5lUikf8kx+zNI7Rd3QLJ0pbdqwrJ3CcOk
 ttV5QXAYD2trfkCKEi69eiIpH21rasqjyI11ZoH4u+0BCpw8hQg=
 =GXjC
 -----END PGP SIGNATURE-----

Merge tag 'v0.21.2rc2' into 1.21-dev

Bitcoin Core 0.21.2 release candidate 2

Tree-SHA512: 7bcdf6c42ac75fb24df8d6b60bddcac5f14363a3f7dd89a239f798bb14b5c911c2d7535a0372c2998719d33a561d0d28b0b6764aaf1f2ec330d4035ce965997b
2021-09-03 13:40:49 +01:00
fanquake b8f5fb7c6b
build: bump version to 0.21.2rc2 2021-08-28 16:01:20 +08:00
W. J. van der Laan bf672ce25a
build: Bump version to 0.21.2rc1
Tree-SHA512: 73d4df24ad516ca54ab23bcbd686223447a208904bb18a7a34400daab6d4b07322a7f244504547c772ede08b9e8606291df9d101236d8fd6debcb43563d069ac
2021-08-11 12:08:43 +02:00
shaolinfry 202871da44 Litecoin: Add scrypt N=1024 PoW 2021-05-30 22:54:48 +01:00
W. J. van der Laan 194b9b8792
build: Bump RC to 0 (-final)
Tree-SHA512: b63d8c2514fa34d4503da8a37fb42948e03610e06dae6aaef7ba3d2568efd3bb138e7510da569a49d83c2618fa697ba949d55880fc2884a75a87028259d7c544
2021-04-29 21:31:20 +02:00
W. J. van der Laan e85dfdbf31 build: Bump version to 0.21.1rc1 2021-04-16 13:23:58 +02:00
fanquake f6896dfde7
build: check if -lsocket is required with *ifaddrs
Github-Pull: #21486
Rebased-From: 879215e665a9f348c8d3fa92701c34065bc86a69
2021-04-06 17:35:41 +08:00
barrystyle 8f77f8870d
1.21 codebase rebrand (#1711)
* build: Brand codebase as Dogecoin via automake/autoconf files.
* build: Update internal resource files for windows builds.
* build: Update internal application names and data directories.
* build: Update immediately visible remaining bitcoin name references from cli binaries and qt.
* build: Update immediately visible bitcoin references in the main gui itself.
* Update functional tests to match Dogecoin
* wallet: Add missing check for -descriptors wallet tool option
* correct output for functional tests (errorlevels?)

Co-authored-by: Ross Nicoll <ross.nicoll@r3.com>
Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2021-02-20 12:13:43 +00:00
Wladimir J. van der Laan 95ea54ba08
build: Bump RC to 0 (-final)
Tree-SHA512: 1a626b9bb7fb04ece4acb24ffcfed178cc5128d16af6860ed37097b6ed36be8b33797bd70a6da0364cd6a9246ebc02fbb83f9523abf5f8dc3c7a524a58416a8f
2021-01-13 22:52:34 +01:00
Wladimir J. van der Laan 4e7b4ce7eb
build: Bump RC to rc5
Tree-SHA512: ed01a7a66e5d064c77c948b87afce832b33852005ec1dc556bf4fcc69fa3743aaa6dea4c03a5d2d520682d8de9c7596f1eec3db326caf754726d1ca4aab2cec3
2021-01-05 15:25:43 +01:00
Wladimir J. van der Laan 212525337e
build: Bump RC to rc4
Tree-SHA512: f22375573f1737d64b62351cdec58f0f3e17d9f21b044430f366cbf272514369b73f24cc34e499e2637f0a0fa57ce5b925dd2df8ba0265b1b9c37beb7c8b8e22
2021-01-03 13:43:03 +01:00
Wladimir J. van der Laan 9ae536d368
build: Bump RC to rc3
Tree-SHA512: a6d81259e17c6b55b33c638a9054eaee2f82322ce0482a73f85562cd56efeb73e2b19b3f7b44fd97e7caa6e757573a8c13ae8967b1e6492f2483d2e057d96c87
2020-12-10 20:00:43 +01:00
Hennadii Stepanov f51e1cb291 build: Use Homebrew's sqlite package if it is available
Github-Pull: #20527
Rebased-From: ee7b84e63cbeadd5e680d69ff0548275581e9241
2020-12-10 13:54:52 +01:00
Hennadii Stepanov 48f8929aad build, refactor: Check that Homebrew's qt5 package is actually installed
This change unifies Homebrew packages workflow, and does not change
behavior.

Github-Pull: #20527
Rebased-From: c96d1f65a552712f8476269ad64a415717ead50d
2020-12-10 13:54:50 +01:00
Hennadii Stepanov 96124a2041 build: Check that Homebrew's berkeley-db4 package is actually installed
Github-Pull: #20563
Rebased-From: d3ef947524a07f8d7fbad5b95781ab6cacb1cb49
2020-12-10 13:54:46 +01:00
Jonas Schnelli 61e316e661 Don't set BDB flags when configuring without
Github-Pull: #20478
Rebased-From: 982e548a9a78b1b0abad59b54c780b6b06570452
2020-12-10 13:54:42 +01:00
Wladimir J. van der Laan ba19f9b490
build: Bump RC to rc2
Tree-SHA512: 122ccac91708dda65a30aab6313c770008ccc0571402d92bc24fbefed578002626899c1754676118f5a456a63dbea84d1fe2fef46af57b77837f438c6e637b26
2020-11-25 08:50:47 +01:00
Wladimir J. van der Laan 463b316822
build: Bump version for 0.21.0rc1
Tree-SHA512: 5bfe150de6e808a6af499e1f01fbfde91fca3fd726e3d457172e94161c4a18fb508824a4b2a58a35ac582d505e4e9da1287a349b51be863dc5bd4fa858400863
2020-11-18 10:33:34 +01:00
Luke Dashjr 7b54d768e1 Make sqlite support optional (compile-time) 2020-10-20 13:44:43 +00:00
Wladimir J. van der Laan 3caee16946
Merge #19953: Implement BIP 340-342 validation (Schnorr/taproot/tapscript)
0e2a5e448f tests: dumping and minimizing of script assets data (Pieter Wuille)
4567ba034c tests: add generic qa-asset-based script verification unit test (Pieter Wuille)
f06e6d0345 tests: functional tests for Schnorr/Taproot/Tapscript (Pieter Wuille)
3c226639eb tests: add BIP340 Schnorr signature support to test framework (Pieter Wuille)
206fb180ec --- [TAPROOT] Tests --- (Pieter Wuille)
d7ff237f29 Activate Taproot/Tapscript on regtest (BIP 341, BIP 342) (Pieter Wuille)
e9a021d7e6 Make Taproot spends standard + policy limits (Pieter Wuille)
865d2c37e2 --- [TAPROOT] Regtest activation and policy --- (Pieter Wuille)
72422ce396 Implement Tapscript script validation rules (BIP 342) (Johnson Lau)
330de894a9 Use ScriptExecutionData to pass through annex hash (Pieter Wuille)
8bbed4b7ac Implement Taproot validation (BIP 341) (Pieter Wuille)
0664f5fe1f Support for Schnorr signatures and integration in SignatureCheckers (BIP 340) (Pieter Wuille)
5de246ca81 Implement Taproot signature hashing (BIP 341) (Johnson Lau)
9eb590894f Add TaggedHash function (BIP 340) (Pieter Wuille)
450d2b2371 --- [TAPROOT] BIP340/341/342 consensus rules --- (Pieter Wuille)
5d62e3a68b refactor: keep spent outputs in PrecomputedTransactionData (Pieter Wuille)
8bd2b4e784 refactor: rename scriptPubKey in VerifyWitnessProgram to exec_script (Pieter Wuille)
107b57df9f scripted-diff: put ECDSA in name of signature functions (Pieter Wuille)
f8c099e220 --- [TAPROOT] Refactors --- (Pieter Wuille)

Pull request description:

  This is an implementation of the Schnorr/taproot consensus rules proposed by BIPs [340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki), [341](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki), and [342](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki).

  See the list of commits [below](https://github.com/bitcoin/bitcoin/pull/19953#issuecomment-691815830). No signing or wallet support of any kind is included, as testing is done entirely through the Python test framework.

  This is a successor to https://github.com/bitcoin/bitcoin/pull/17977 (see discussion following [this comment](https://github.com/bitcoin/bitcoin/pull/17977#issuecomment-682285983)), and will have further changes squashed/rebased. The history of this PR can be found in #19997.

ACKs for top commit:
  instagibbs:
    reACK 0e2a5e448f
  benthecarman:
    reACK 0e2a5e4
  kallewoof:
    reACK 0e2a5e448f
  jonasnick:
    ACK 0e2a5e448f almost only looked at bip340/libsecp related code
  jonatack:
    ACK 0e2a5e448f modulo the last four commits (tests) that I plan to finish reviewing tomorrow
  fjahr:
    reACK 0e2a5e448f
  achow101:
    ACK 0e2a5e448f

Tree-SHA512: 1b00314450a2938a22bccbb4e177230cf08bd365d72055f9d526891f334b364c997e260c10bc19ca78440b6767712c9feea7faad9a1045dd51a5b96f7ca8146e
2020-10-15 10:22:35 +02:00
Andrew Chow 54729f3f4e Add libsqlite3 2020-10-14 11:18:12 -04:00
Wladimir J. van der Laan 99a1d572ea
Merge #18750: build: optionally skip external warnings
ba8950ee01 build: optionally skip external warnings (Vasil Dimov)

Pull request description:

  Add an option to `./configure` to suppress compilation warnings from
  external headers. The option is off by default (no change in behavior,
  show warnings from external headers).

  This option is useful if e.g. Boost or Qt is installed outside of
  `/usr/include` (warnings from headers in `/usr/include` are already
  suppressed by default) and those warnings stand in the way of compiling
  Bitcoin Core with `-Werror[=...]` or they just clutter the build output
  too much and make our own warnings hard to spot.

  `-isystem /usr/include` bricks GCC's `#include_next`, so we use
  `-idirafter` instead. This way we don't have to treat `/usr/include`
  specially.

ACKs for top commit:
  practicalswift:
    ACK ba8950ee0134a7958e3e9b041cd54d222feb09a1: diff looks correct!
  hebasto:
    ACK ba8950ee01, tested on Linux Mint 20 (x86_64).
  luke-jr:
    utACK ba8950ee01

Tree-SHA512: 9b54fae8590be6c79f2688a5aca09e0a9067f481dabecdd49bb278c08a62ac2b0cc704c894fbd53240e77ac84da0c7a237845df0a696cfbdb0359e1c8e2e10c9
2020-10-14 14:57:15 +02:00
Pieter Wuille 0664f5fe1f Support for Schnorr signatures and integration in SignatureCheckers (BIP 340)
This enables the schnorrsig module in libsecp256k1, adds the relevant types
and functions to src/pubkey, as well as in higher-level `SignatureChecker`
classes. The (verification side of the) BIP340 test vectors is also added.
2020-10-12 17:15:40 -07:00
Vasil Dimov ba8950ee01
build: optionally skip external warnings
Add an option to `./configure` to suppress compilation warnings from
external headers. The option is off by default (no change in behavior,
show warnings from external headers).

This option is useful if e.g. Boost or Qt is installed outside of
`/usr/include` (warnings from headers in `/usr/include` are already
suppressed by default) and those warnings stand in the way of compiling
Bitcoin Core with `-Werror[=...]` or they just clutter the build output
too much and make our own warnings hard to spot.
2020-10-12 18:18:24 +02:00
MarcoFalke fae7a1c188
fuzz: Configure check for main function 2020-10-04 17:49:07 +02:00
fanquake afecde8046
build: add PTHREAD_LIBS to LDFLAGS configure output
Also moves $PTHREAD_CFLAGS to the CFLAGS.
2020-09-14 16:12:36 +08:00
fanquake 0adb80fe63
Merge #19803: Bugfix: Define and use HAVE_FDATASYNC correctly outside LevelDB
c4b85ba704 Bugfix: Define and use HAVE_FDATASYNC correctly outside LevelDB (Luke Dashjr)

Pull request description:

  Fixes a bug introduced in #19614

  The LevelDB-specific fdatasync check was only using `AC_SUBST`, which works for Makefiles, but doesn't define anything for C++. Furthermore, the #define is typically 0 or 1, never undefined.

  This fixes both issues by defining it and checking its value instead of whether it is merely defined.

  Pulled out of #14501 by fanquake's request

ACKs for top commit:
  fanquake:
    ACK c4b85ba704 - thanks for catching and fixing my mistake.
  laanwj:
     Code review ACK c4b85ba704

Tree-SHA512: 91d5d426ba000b4f3ee7e2315635e24bbb23ceff16269ddf4f65a63d25fc9e9cf94a3b236eed2f8031cc36ddcf78aeb5916efcb244f415943a8a12f907ede8f9
2020-08-31 13:07:24 +08:00
Wladimir J. van der Laan 4631dc5c57
Merge #18921: build: add stack-clash and control-flow protection options to hardening flags
b536813cef build: add -fstack-clash-protection to hardening flags (fanquake)
076183b36b build: add -fcf-protection=full to hardening options (fanquake)

Pull request description:

  Beginning with Ubuntu `19.10`, it's packaged GCC now has some additional hardening options enabled by default (in addition to existing defaults like `-fstack-protector-strong` and reducing the minimum ssp buffer size). The new additions are`-fcf-protection=full` and `-fstack-clash-protection`.

  > -fcf-protection=[full|branch|return|none]
  > Enable code instrumentation of control-flow transfers to increase program security by checking that target addresses of control-flow transfer instructions (such as indirect function call, function return, indirect jump) are valid. This prevents diverting the flow of control to an unexpected target. This is intended to protect against such threats as Return-oriented Programming (ROP), and similarly call/jmp-oriented programming (COP/JOP).

  > -fstack-clash-protection
  > Generate code to prevent stack clash style attacks. When this option is enabled, the compiler will only allocate one page of stack space at a time and each page is accessed immediately after allocation. Thus, it prevents allocations from jumping over any stack guard page provided by the operating system.

  If your interested you can grab `gcc-9_9.3.0-10ubuntu2.debian.tar.xz` from https://packages.ubuntu.com/focal/g++-9. The relevant changes are part of the `gcc-distro-specs` patches, along with the relevant additions to the gcc manages:

  > NOTE: In Ubuntu 19.10 and later versions, -fcf-protection is enabled by default for C, C++, ObjC, ObjC++, if none of -fno-cf-protection nor -fcf-protection=* are found.

  > NOTE: In Ubuntu 19.10 and later versions, -fstack-clash-protection is enabled by default for C, C++, ObjC, ObjC++, unless -fno-stack-clash-protection is found.

  So, if you're C++ using GCC on Ubuntu 19.10 or later, these options will be active unless you explicitly opt out. This can be observed with a small test:

  ```c++
  int main() { return 0; }
  ```

  ```bash
  g++ --version
  g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0

  g++ test.cpp

  objdump -dC a.out
  ..
  0000000000001129 <main>:
      1129:	f3 0f 1e fa          	endbr64
      112d:	55                   	push   %rbp
      112e:	48 89 e5             	mov    %rsp,%rbp
      1131:	b8 00 00 00 00       	mov    $0x0,%eax
      1136:	5d                   	pop    %rbp
      1137:	c3                   	retq
      1138:	0f 1f 84 00 00 00 00 	nopl   0x0(%rax,%rax,1)
      113f:	00

  # recompile opting out of control flow protection
  g++ test.cpp -fcf-protection=none

  objdump -dC a.out
  ...
  0000000000001129 <main>:
      1129:	55                   	push   %rbp
      112a:	48 89 e5             	mov    %rsp,%rbp
      112d:	b8 00 00 00 00       	mov    $0x0,%eax
      1132:	5d                   	pop    %rbp
      1133:	c3                   	retq
      1134:	66 2e 0f 1f 84 00 00 	nopw   %cs:0x0(%rax,%rax,1)
      113b:	00 00 00
      113e:	66 90                	xchg   %ax,%ax
  ```

  Note the insertion of an `endbr64` instruction when compiling and _not_ opting out. This instruction is part of the Intel Control-flow Enforcement Technology [spec](https://software.intel.com/sites/default/files/managed/4d/2a/control-flow-enforcement-technology-preview.pdf), which the GCC control flow implementation is based on.

  If we're still doing gitian builds for the `0.21.0` and `0.22.0` releases, we'd likely update the gitian image to Ubuntu Focal, which would mean that the GCC used for gitian builds would also be using these options by default. So we should decide whether we want to explicitly turn these options on as part of our hardening options (although not just for this reason), or, we should be opting-out.

  GCC has supported both options since 8.0.0. Clang has supported `-fcf-protection` from 7.0.0 and will support `-fstack-clash-protection` in it's upcoming [11.0.0 release](https://clang.llvm.org/docs/ReleaseNotes.html#id6).

ACKs for top commit:
  jamesob:
    ACK b536813cef ([`jamesob/ackr/18921.1.fanquake.build_add_stack_clash_an`](https://github.com/jamesob/bitcoin/tree/ackr/18921.1.fanquake.build_add_stack_clash_an))
  laanwj:
    Code review ACK b536813cef

Tree-SHA512: abc9adf23cdf1be384f5fb9aa5bfffdda86b9ecd671064298d4cda0440828b509f070f9b19c88c7ce50ead9ff32afff9f14c5e78d75f01241568fbfa077be0b7
2020-08-29 13:42:04 +02:00
Luke Dashjr c4b85ba704 Bugfix: Define and use HAVE_FDATASYNC correctly outside LevelDB 2020-08-25 16:46:00 +00:00
fanquake 8e0f341779
Merge #15704: Move Win32 defines to configure.ac to ensure they are globally defined
1ccb9f30c0 Move Win32 defines to configure.ac to ensure they are globally defined (Luke Dashjr)

Pull request description:

  #9245 no longer needs this, since the main `_WIN32_WINNT` got bumped by something else.

  So rather than just lose it, might as well get it merged in independently.

  I'm not aware of any practical effects, but it seems safer to use the same API versions everywhere.

ACKs for top commit:
  fanquake:
    ACK 1ccb9f30c0 - checked that the binaries produced are the same.

Tree-SHA512: 273e9186579197be01b443b6968e26b9a8031d356fabc5b73aa967fcdb837df195b7ce0fc4e4529c85d9b86da6f2d7ff1bf56a3ff0cbbcd8cee8a9c2bf70a244
2020-08-25 11:52:52 +08:00
fanquake 38c13a4a60
Merge #19689: build: Add Qt version checking
4af4672525 build, qt: Add Qt version checking (Hennadii Stepanov)
30e336f785 build: Drop unused bitcoin_cv_qt58 (Hennadii Stepanov)

Pull request description:

  Now `configure` script checks that Qt version is not less then minimum required (currently [5.5.1](https://github.com/bitcoin/bitcoin/pull/15393)).

  This PR is an alternative to #15706 (see https://github.com/bitcoin/bitcoin/pull/15706#issuecomment-629076962).

  Closes #15688.

  The first commit removes dead code (see https://github.com/bitcoin/bitcoin/pull/18297#issuecomment-603252662).

ACKs for top commit:
  fanquake:
    ACK 4af4672525 - this looks ok. I've tested this with Qt 5.15.0 and Qt 5.7.1 system libs, as well as 5.9.8 from depends.

Tree-SHA512: 8e3b82fa3a98926814923331038185633fabad962c271f31bd158e1ab293dcde52ab1dbf997745540a9ed27e16835cf5b5f3701d405876d877fa561eb03cc619
2020-08-24 12:14:18 +08:00
Luke Dashjr 1ccb9f30c0 Move Win32 defines to configure.ac to ensure they are globally defined
common.vcxproj used for MSVC builds
2020-08-20 17:55:06 +00:00
fanquake 772cb03a28
Merge #19015: build: Enable some commonly enabled compiler diagnostics
2f8a4c9a06 build: Enable some commonly enabled compiler diagnostics (practicalswift)

Pull request description:

  Enable some commonly enabled compiler diagnostics as discussed in #17344.

  | Compiler diagnostic | no# of emitted unique GCC warnings in `master` | no# of emitted unique Clang warnings in `master` |
  | ------------- | ------------- | ------------- |
  | `-Wduplicated-branches`: Warn if `if`/`else` branches have duplicated code  | 0 | Not supported |
  | `-Wduplicated-cond`: Warn if `if`/`else` chain has duplicated conditions  | 0 | Not supported |
  | `-Wlogical-op`: Warn about logical operations being used where bitwise were probably wanted  | 0 | Not supported |
  | `-Woverloaded-virtual`: Warn if you overload (not `override`) a virtual function  | 0 | 0 |
  | ~~`-Wunused-member-function`: Warn on unused member function~~  | Not supported | 2 |
  | ~~`-Wunused-template`: Warn on unused template~~ | Not supported | 1 |

  There is a large overlap between this list and [Jason Turner's list of recommended compiler diagnostics in the Collaborative Collection of C++ Best Practices (`cppbestpractices`) project](https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang). There is also an overlap with the recommendations given in the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) (with editors Bjarne Stroustrup and Herb Sutter).

  Closes #17344.

ACKs for top commit:
  jonatack:
    ACK 2f8a4c9a06 no warnings for me with these locally on debian 5.7.10-1 (2020-07-26) x86_64 with gcc 10 and clang 12
  fanquake:
    ACK 2f8a4c9a06 - no-longer seeing any obvious issues with doing this.
  hebasto:
    ACK 2f8a4c9a06, no new warnings in Travis jobs.

Tree-SHA512: f669ea22b31263a555f999eff6a9d65750662e95831b188c3192a2cf0127fb7b5136deb762a6b0b7bbdfb0dc6a40caf48251a62b164fffb81dd562bdd15ec3c8
2020-08-18 13:00:13 +08:00
MarcoFalke fa55c1d5fd
build: Add Werror=range-loop-analysis 2020-08-14 15:27:38 +02:00
practicalswift 2f8a4c9a06 build: Enable some commonly enabled compiler diagnostics 2020-08-11 12:03:28 +00:00
Hennadii Stepanov 4af4672525
build, qt: Add Qt version checking 2020-08-10 02:10:28 +03:00
Hennadii Stepanov c71bdf93d7
build, test: Add support for llvm-cov 2020-08-08 22:53:15 +03:00
fanquake 82127d27c9
Merge #19667: build: set minimum required Boost to 1.58.0
70452a070b build: set minimum required Boost to 1.58 (fanquake)

Pull request description:

  Any systems which only have an older installable Boost can use depends.
  1.58.0 retains compatibility with the packages [installable on Ubuntu 16.04](https://packages.ubuntu.com/xenial/libboost-dev).

  The projects usage of Boost wont be going away any time soon, if ever (i.e #15382), and our usage of the test framework.

  Fixes: #19506

ACKs for top commit:
  practicalswift:
    ACK 70452a070b -- patch looks correct
  laanwj:
    ACK 70452a070b
  hebasto:
    ACK 70452a070b, tested on Linux Mint 20 (x86_64).

Tree-SHA512: d290415e3c70a394b3d7659c0480a35b4082bdce8d48b1c64a0025f7ad6e21567b4dc85813869513ad246d27f950706930410587c11c1aa3693ae6245084765c
2020-08-06 19:29:09 +08:00
fanquake 70452a070b
build: set minimum required Boost to 1.58
Any systems which only have an older install-able Boost can use depends.

Fixes: #19506
2020-08-05 17:13:45 +08:00
Sjors Provoost c47e4bbf0b
[build] make boost-process opt-in 2020-07-31 13:38:09 +02:00
Sjors Provoost 929cda5470
configure: add ax_boost_process
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
2020-07-31 13:38:09 +02:00
fanquake 2e9e6377f1
build: add -Wl,-z,separate-code to hardening flags
This flag was added to binutils/ld in the 2.30 release, 
see commit c11c786f0b45617bb8807ab6a57220d5ff50e414:

> The new "-z separate-code" option will generate separate code LOAD
segment which must be in wholly disjoint pages from any other data.


It was made the default for Linux/x86 targets in the 2.31 release, see commit
f6aec96dce1ddbd8961a3aa8a2925db2021719bb:

> This patch adds --enable-separate-code to ld configure to turn on
-z separate-code by default and enables it by default for Linux/x86.
This avoids mixing code pages with data to improve cache performance
as well as security.

> To reduce x86-64 executable and shared object sizes, the maximum page
size is reduced from 2MB to 4KB when -z separate-code is turned on by
default.  Note: -z max-page-size= can be used to set the maximum page
size.

> We compared SPEC CPU 2017 performance before and after this change on
Skylake server.  There are no any significant performance changes.
Everything is mostly below +/-1%.

Support was also added to LLVMs lld: https://reviews.llvm.org/D64903, however
there is remains off by default.

There were concerns about an increase in binary size, however in our case, the
increase (1 page worth of bytes) would seem negligible, given we are shipping a
multi-megabyte binary, which then downloads 100's of GBs of data.

Also note that most recent versions of distros are shipping a new enough version
of binutils that this is available and/or on by default (assuming the distro has
not turned it off, I haven't checked everywhere):

CentOS 8: 2.30
Debian Buster 2.31.1
Fedora 29: 2.31.1
FreeBSD: 2.33
GNU Guix: 2.33 / 2.34
Ubuntu 18.04: 2.30

Related threads / discussion:
https://bugzilla.redhat.com/show_bug.cgi?id=1623218
2020-07-28 12:57:35 +08:00
fanquake ef3d4ce4c3
build: call AC_PATH_TOOL for dsymutil in macOS cross-compile
While testing #19530 I noticed that we couldn't call dsymutil after LTO:
```bash
../libtool: line 10643: x86_64-apple-darwin16-dsymutil: command not found
```

This updates configure to call `AC_PATH_TOOL` so that we end up with the
full path to dsymutil, similar to `otool` and `install_name_tool`, ie:
`/bitcoin/depends/x86_64-apple-darwin16/share/../native/bin/x86_64-apple-darwin16-otool`.
2020-07-22 18:22:56 +08:00
fanquake 6cef3652d1
build: fix -Wformat-security check when compiling with GCC
Debian GCC ignores -Wformat-security, without -Wformat, which
means when we test for it, it currently fails:

```bash
checking whether C++ compiler accepts -Wformat-security... no
...
configure:15907: checking whether C++ compiler accepts -Wformat-security
configure:15926: g++ -std=c++11 -c -g -O2 -Werror -Wformat-security  conftest.cpp >&5
cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]
cc1plus: all warnings being treated as errors
```

Fix this by just combining the -Wformat and -Wformat-security checks
together.
2020-07-15 17:50:01 +08:00
fanquake 7d9008f43e
Merge #18307: build: Require pkg-config for all of the hosts
92bc268e4a build: Detect missed pkg-config early (Hennadii Stepanov)
1739eb23d8 build: Drop unused use_pkgconfig variable (Hennadii Stepanov)
a661449a2e build: Drop use_pkgconfig check for libmultiprocess check (Hennadii Stepanov)
90b95e7929 build: Drop dead non-pkg-config code for libevent check (Hennadii Stepanov)
44a14afbb8 build: Drop dead non-pkg-config code for qrencode check (Hennadii Stepanov)
10cbae0c39 build: Drop dead non-pkg-config code for ZMQ check (Hennadii Stepanov)
06cfc9cadf build: Fix indentation in UNIVALUE check (Hennadii Stepanov)
6fd2118e77 build: Drop dead non-pkg-config code for UNIVALUE check (Hennadii Stepanov)
e9edbe4dbd build: Always use pkg-config (Hennadii Stepanov)
9e2e753b06 build: Always define ZMQ_STATIC for MinGW (Hennadii Stepanov)

Pull request description:

  This PR:
  - is based on #18297 (already merged)
  - drops all of the non-pkg-config paths from the `configure` script

  Ref: #17768

ACKs for top commit:
  fanquake:
    ACK 92bc268e4a. I re-gitian-built. There are a couple follow-ups that I'll PR shortly. Thanks for addressing my feedback above. I took too long to get back to this.
  laanwj:
    ACK 92bc268e4a

Tree-SHA512: 83c2d9cf03518867a1ebf7e26a8fc5b6dd8962ef983fe0d84e0c7eb74717f4c36a834da02faf0e503ffd87167005351671cf040c0d4ddae57ee152a6ff84012b
2020-07-03 16:15:52 +08:00
Wladimir J. van der Laan 9d92ee12fd
Merge #19257: build: remove BIP70 configure option
c4ffcf07af build: remove BIP70 configure option (fanquake)

Pull request description:

  This was left in after #17165, so that anyone who had been compiling
  with (already disabled by default) BIP70 would realise that support
  had been completely removed in 0.20.0. However we should be able to
  remove it for 0.21.0.

ACKs for top commit:
  jnewbery:
    utACK c4ffcf07af
  MarcoFalke:
    ACK c4ffcf07af with or without the "catch-all reject"

Tree-SHA512: a5dd4231ed97c9dd1984fb90d69a8725df2fdda0b963269b0575601c74528e5d820a4a863c428f8ede86eaae2a1606671fe1fcebdeb96b1023f7a5f899270284
2020-07-01 16:31:04 +02:00
Wladimir J. van der Laan 1269cab21a
Merge #19403: build: improve __builtin_clz* detection
9952242c03 build: improve builtin_clz* detection (fanquake)

Pull request description:

  Fixes #19402.

  The way we currently test for `__builtin_clz*` support with `AC_CHECK_DECLS` does not work with Clang:
  ```bash
  configure:21492: clang++-10 -std=c++11 -c -g -O2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS conftest.cpp >&5
  conftest.cpp💯10: error: builtin functions must be directly called
    (void) __builtin_clz;
           ^
  1 error generated.
  ```

  This also removes the `__builtin_clz()` check, as we don't actually use it anywhere, and it's trvial to re-add detection if we do start using it at some point. If this is controversial then I'll add a test for it as well.

ACKs for top commit:
  sipa:
    ACK 9952242c03
  laanwj:
    ACK 9952242c03

Tree-SHA512: 695abb1a694a01a25aaa483b4fffa7d598842f2ba4fe8630fbed9ce5450b915c33bf34bb16ad16a16b702dd7c91ebf49fe509a2498b9e28254fe0ec5177bbac0
2020-06-29 15:49:08 +02:00
fanquake 9952242c03
build: improve builtin_clz* detection
The way we currently test with AC_CHECK_DECLS do not work with Clang:
```bash
configure:21492: clang++-10 -std=c++11 -c -g -O2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS conftest.cpp >&5
conftest.cpp💯10: error: builtin functions must be directly called
  (void) __builtin_clz;
         ^
1 error generated.
```

This also removes the __builtin_clz() check, as we don't actually use
it anywhere, and it's trvial to re-add detection if we do start using
it at some point.
2020-06-29 11:31:17 +08:00
Glenn Willen 8578c6fccd build: Fix search for brew-installed BDB 4 on OS X
On OS X, when searching Homebrew keg-only packages for BDB 4.8, if we find it,
use BDB_CPPFLAGS and BDB_LIBS instead of CFLAGS and LIBS for the result. This
is (1) more correct, and (2) necessary in order to give this location
priority over other directories in the include search path, which may include
system include directories with other versions of BDB.
2020-06-23 22:04:02 -07:00
Hennadii Stepanov 92bc268e4a
build: Detect missed pkg-config early 2020-06-23 09:02:11 +03:00