Commit Graph

337 Commits

Author SHA1 Message Date
Jon Layton 2a63c34936 Merge remote-tracking branch 'btc/master' into upstream-merge 2018-10-16 22:27:53 -05:00
Luke Dashjr 92af71cea9 configure: Make it possible to build only one of bitcoin-cli or bitcoin-tx 2018-09-13 11:48:23 +00:00
Wladimir J. van der Laan 7c7bb6e772
Merge #14127: build: avoid getifaddrs when unavailable
9256f7d13f build: avoid getifaddrs when unavailable (Cory Fields)

Pull request description:

  These changes from @theuni help building when targeting platforms that don't always have getifaddrs available like Android < 24

Tree-SHA512: dbfeb83297bd6f00b7991f53eef8a04948d2d739bf47c0524d9ae5335b843b8a5c06ff98c109fe5e6192665e6d0cf58700b8aa7e2a0b410281d3c052881973ff
2018-09-10 18:08:05 +02:00
Cory Fields 9256f7d13f
build: avoid getifaddrs when unavailable 2018-09-01 15:25:03 +02:00
Chris Stewart b2f49bd732 Integration of property based testing into Bitcoin Core
update copyright headers

attempt to fix linting errors

Fixing issue with make check classifying generator files as actual unit tests

Wrapping gen files in ENABLE_PROPERTY_TESTS macro

Make macro better
2018-08-27 08:51:51 -05:00
MarcoFalke 3bd25c010c
Merge #13899: build: Enable -Wredundant-decls where available. Remove redundant redeclarations.
d56b73f217 Remove redundant extern (practicalswift)
f04bb1361c Enable -Wredundant-decls (gcc) if available (practicalswift)
a9e90e5002 Remove redundant redeclaration of rescanblockchain(...) in same scope (practicalswift)

Pull request description:

  Remove redundant redeclaration of `rescanblockchain` and enable `-Wredundant-decls` (gcc) where available to avoid accidental redundant redeclarations.

  ```
   CXX      wallet/libbitcoin_wallet_a-rpcwallet.o
  wallet/rpcwallet.cpp:4764:17: warning: redundant redeclaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’ in same scope [-Wredundant-decls]
   extern UniValue rescanblockchain(const JSONRPCRequest& request);
                   ^~~~~~~~~~~~~~~~
  wallet/rpcwallet.cpp:3929:10: note: previous declaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’
   UniValue rescanblockchain(const JSONRPCRequest& request)
            ^~~~~~~~~~~~~~~~
  ```

Tree-SHA512: b9af95fa53f494c3f6702e485956b66b042d2ff7578b4a53bf28e91aa844cdcf5d7ac3e2e710948eed566007324e81317304b8eabf2d4ea284cd6acd77f8ffcd
2018-08-13 09:55:35 -04:00
Wladimir J. van der Laan 58efc49b95
build: bump version to 0.17.99
Now that 0.17 branch has been split off, master is 0.17.99 (pre-0.18).

Also clean out release notes.

Tree-SHA512: bb20025d3ead3346afc7a6a51af715783e705e1de9d1b90ced6423d8969d64e42b72d06a1eb853083b11e9cfe674775266792ae2cd18ed6c858938e125edab03
2018-08-13 15:38:28 +02:00
practicalswift f04bb1361c Enable -Wredundant-decls (gcc) if available 2018-08-06 23:53:01 +02:00
Don Shin f01af43fa4 Made mac-specific build changes included by a configure flag as a temporary measure. 2018-07-23 22:04:40 -05:00
Wladimir J. van der Laan 2dc5ab6378
Merge #13482: Remove boost::program_options dependency
f447a0a707 Remove program options from build system (Chun Kuan Lee)
11588c639e Replace boost program_options (Chun Kuan Lee)

Pull request description:

  Concept from #12744, but without parsing negated options.

Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
2018-07-20 16:45:44 +02:00
Chun Kuan Lee f447a0a707 Remove program options from build system 2018-07-18 02:48:34 +00:00
Jon Layton 18227b4fea
Merge pull request #28 from ch4ot1c/improvement/build-without-disablewallet
Improvement: Build without -disablewallet
2018-07-15 16:40:28 -05:00
Cory Fields 768981c93d build: add missing leveldb defines
src/leveldb/build_detect_platform shows how upstream defines them.

These platform may not be able to fully build or run Bitcoin, but defining all
known to leveldb saves future hassle.

Now that all possible platforms are enumerated, specifying an unknown one is an
error.
2018-07-13 16:47:19 -04:00
Wladimir J. van der Laan dcb154e5aa
Merge #13177: GCC-7 and glibc-2.27 back compat code
253f592909 Add stdin, stdout, stderr to ignored export list (Chun Kuan Lee)
fc6a9f2ab1 Use IN6ADDR_ANY_INIT instead of in6addr_any (Cory Fields)
908c1d7745 GCC-7 and glibc-2.27 compat code (Chun Kuan Lee)

Pull request description:

  The `__divmoddi4` code was modified from https://github.com/gcc-mirror/gcc/blob/master/libgcc/libgcc2.c . I manually find the older glibc version of log2f by objdump, use `.symver` to specify the certain version.

Tree-SHA512: e8d875652003618c73e019ccc420e7a25d46f4eaff1c7a1a6bfc1770b3b46f074b368b2cb14df541b5ab124cca41dede4e28fe863a670589b834ef6b8713f9c4
2018-07-12 17:46:29 +02:00
Jon Layton 49fba5f51b [build] Add -lgomp to LIBZCASH_LIBS flags to prevent GOMP_CRITICAL_START/END error in libsnark 2018-07-11 17:37:50 -05:00
Wladimir J. van der Laan 3a3eabef40
Merge #13386: SHA256 implementations based on Intel SHA Extensions
66b2cf1ccf Use immintrin.h everywhere for intrinsics (Pieter Wuille)
4c935e2eee Add SHA256 implementation using using Intel SHA intrinsics (Pieter Wuille)
268400d318 [Refactor] CPU feature detection logic for SHA256 (Pieter Wuille)

Pull request description:

  Based on #13191.

  This adds SHA256 implementations that use Intel's SHA Extension instructions (using intrinsics). This needs GCC 4.9 or Clang 3.4.

  In addition to #13191, two extra implementations are provided:
  * (a) A variable-length SHA256 implementation using SHA extensions.
  * (b) A 2-way 64-byte input double-SHA256 implementation using SHA extensions.

  Benchmarks for 9001-element Merkle tree root computation on an AMD Ryzen 1800X system:
  * Using generic C++ code (pre-#10821): 6.1ms
  * Using SSE4 (master, #10821): 4.6ms
  * Using 4-way SSE4 specialized for 64-byte inputs (#13191): 2.8ms
  * Using 8-way AVX2 specialized for 64-byte inputs (#13191): 2.1ms
  * Using 2-way SHA-NI specialized for 64-byte inputs (this PR): 0.56ms

  Benchmarks for 32-byte SHA256 on the same system:
  * Using SSE4 (master, #10821): 190ns
  * Using SHA-NI (this PR): 53ns

  Benchmarks for 1000000-byte SHA256 on the same system:
  * Using SSE4 (master, #10821): 2.5ms
  * Using SHA-NI (this PR): 0.51ms

Tree-SHA512: 2b319e33b22579f815d91f9daf7994a5e1e799c4f73c13e15070dd54ba71f3f6438ccf77ae9cbd1ce76f972d9cbeb5f0edfea3d86f101bbc1055db70e42743b7
2018-07-09 21:17:18 +02:00
Chun Kuan Lee 49d1f4cdde Detect if char equals int8_t 2018-07-01 15:37:28 +00:00
Pieter Wuille 66b2cf1ccf Use immintrin.h everywhere for intrinsics 2018-06-26 10:11:08 -07:00
Pieter Wuille 4c935e2eee Add SHA256 implementation using using Intel SHA intrinsics 2018-06-26 10:11:08 -07:00
practicalswift 94e52d13db Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used 2018-06-24 20:35:27 +02:00
Wladimir J. van der Laan 31145a3d7c
Merge #13480: Avoid copies in range-for loops and add a warning to detect them
d92204c900 build: add warning to detect hidden copies in range-for loops (Cory Fields)
466e16e0e8 cleanup: avoid hidden copies in range-for loops (Cory Fields)

Pull request description:

  Following-up on #13241, which was itself a follow-up of #12169.

  See title. Fixing these would otherwise be a continuous process, adding the warning should keep them from cropping up.

  Note that the warning seems to be Clang-only for now.

Tree-SHA512: ccfb769c3128b3f92c95715abcf21ee2496fe2aa384f80efead1529a28eeb56b98995b531b49a089f8142601389e63f7bb935963d724eacde4f5e1b4a024934b
2018-06-24 16:36:40 +02:00
Cory Fields d92204c900 build: add warning to detect hidden copies in range-for loops 2018-06-15 13:40:07 -04:00
Wladimir J. van der Laan bad068ad9f build: Build system changes to support only Qt5 2018-06-13 18:15:47 +02:00
Wladimir J. van der Laan 8eb76f3958
Merge #13445: build: Reset default -g -O2 flags when enable debug
9882d1f044 Reset default -g -O2 flags when enable debug (Chun Kuan Lee)

Pull request description:

  The default CXXFLAGS is -g -O2, this should not appear when enable debug.
  fixes #13432

Tree-SHA512: 79447f3e1fab9e6cd12f5ca49b3d42187e856e0c159ed01140ea93d6ef1fbb1af3d65b338308566330491052c0177d12abe26796513502ddde31692665a0dbb4
2018-06-13 15:49:10 +02:00
Chun Kuan Lee 9882d1f044 Reset default -g -O2 flags when enable debug 2018-06-12 07:51:56 +00:00
Ben Woosley 51cd508e2f
When build fails due to lib missing, indicate which one
A failure of "lib missing" has limited utility.
2018-06-11 13:27:44 -07:00
jc f25bfa57b5 [copyright] Update copyright information to reflect new dependencies 2018-06-09 06:25:10 -04:00
Wladimir J. van der Laan 0de7cc848e
Merge #13191: Specialized double-SHA256 with 64 byte inputs with SSE4.1 and AVX2
4defdfab94 [MOVEONLY] Move unused Merkle branch code to tests (Pieter Wuille)
4437d6e1f3 8-way AVX2 implementation for double SHA256 on 64-byte inputs (Pieter Wuille)
230294bf5f 4-way SSE4.1 implementation for double SHA256 on 64-byte inputs (Pieter Wuille)
1f0e7ca09c Use SHA256D64 in Merkle root computation (Pieter Wuille)
d0c9632883 Specialized double sha256 for 64 byte inputs (Pieter Wuille)
57f34630fb Refactor SHA256 code (Pieter Wuille)
0df017889b Benchmark Merkle root computation (Pieter Wuille)

Pull request description:

  This introduces a framework for specialized double-SHA256 with 64 byte inputs. 4 different implementations are provided:
  * Generic C++ (reusing the normal SHA256 code)
  * Specialized C++ for 64-byte inputs, but no special instructions
  * 4-way using SSE4.1 intrinsics
  * 8-way using AVX2 intrinsics

  On my own system (AVX2 capable), I get these benchmarks for computing the Merkle root of 9001 leaves (supported lengths / special instructions / parallellism):
  * 7.2 ms with varsize/naive/1way (master, non-SSE4 hardware)
  * 5.8 ms with size64/naive/1way (this PR, non-SSE4 capable systems)
  * 4.8 ms with varsize/SSE4/1way (master, SSE4 hardware)
  * 2.9 ms with size64/SSE4/4way (this PR, SSE4 hardware)
  * 1.1 ms with size64/AVX2/8way (this PR, AVX2 hardware)

Tree-SHA512: efa32d48b32820d9ce788ead4eb583949265be8c2e5f538c94bc914e92d131a57f8c1ee26c6f998e81fb0e30675d4e2eddc3360bcf632676249036018cff343e
2018-06-04 12:11:53 +02:00
jc 8e04b9dd54 [build] autoconf adaptions for new files and targets and update dependencies 2018-06-03 09:36:22 -04:00
Chun Kuan Lee 908c1d7745 GCC-7 and glibc-2.27 compat code 2018-06-02 19:18:41 +00:00
Pieter Wuille 4437d6e1f3 8-way AVX2 implementation for double SHA256 on 64-byte inputs 2018-05-29 14:18:05 -07:00
Pieter Wuille 230294bf5f 4-way SSE4.1 implementation for double SHA256 on 64-byte inputs 2018-05-29 14:18:05 -07:00
Cory Fields 9e305b56f5 build: split warnings out of CXXFLAGS
CXXFLAGS should not be modified anyway. Also, this will enable us to
selectively disable warnings.
2018-05-22 17:47:11 -04:00
Wladimir J. van der Laan cb088b1461
Merge #13005: Make --enable-debug to pick better options
9e49db2 Make --enable-debug to pick better options (Evan Klitzke)

Pull request description:

  Cherry-picked (and rebased) 94189645e67f364c4445d62e2b00c282d885cbbf from the "up for grabs" PR: "[build] Make --enable-debug pick better options" (#12695).

  See previous review in #12695.

Tree-SHA512: a93cdadcf13e2ef8519acb1ce4f41ce95057a388347bb0a86a5c164dc7d0b0d14d4bb2a466082d5a100b8d50de65c605c40abaed555e8ea77c99e28800a34439
2018-05-14 15:33:03 +02:00
Chun Kuan Lee 457c2da2ac Remove python2 from configure.ac 2018-05-01 19:03:28 +08:00
Wladimir J. van der Laan 3e53004339 test: add rpcauth-test to AC_CONFIG_LINKS to fix out-of-tree make check
Add rpcauth-test (introduced #13056) to AC_CONFIG_LINKS, like the other
directly called python scripts, to fix out-of-tree `make check`.
2018-04-25 16:37:10 +02:00
Evan Klitzke 9e49db2426 Make --enable-debug to pick better options
Various changes:

 * Don't check $GCC and $GXX
 * Prefer -Og instead of -O0
 * If -g3 isn't available, use -g

This also incidentally fixes compiler warnings with GCC and glibc when using
--enable-debug, as the old default values mixed poorly with the hardening flags.
2018-04-17 10:37:43 +02:00
Akio Nakamura 2eb5036c33 macOS: Prevent Xcode 9.3 build warnings
This PR solves #12867 (needs to run autogen.sh && ./configure)

clang (Apple LLVM version 9.1.0 (clang-902.0.39.1)) warns unused
argument '-pie' during compilation.
So we check for warnings in the test using $CXXFLAG_WERROR.

Windows is alse default-pie and was special-cased because it also
warned, but we can also eliminate that case if warnings are caught.
2018-04-13 10:26:05 +09:00
practicalswift 01189ab9ae build: Show enabled sanitizers in configure output 2018-04-06 11:08:20 +02:00
Evan Klitzke 6feb46c372
Add --with-sanitizers option to configure
This enables the use of different compiler sanitizers, coresponding to
the -fsanitize option in GCC and Clang.
2018-03-28 12:33:04 -07:00
Vasil Dimov 8ae413235d
Remove redundant checks for MSG_* from configure.ac
It is redundant to check for the presence of MSG_NOSIGNAL macro in
configure.ac, define HAVE_MSG_NOSIGNAL and then check whether the later
is defined in the source code. Instead we can check directly whether
MSG_NOSIGNAL is defined. Same for MSG_DONTWAIT.

In addition to that, the checks we had in configure.ac produce a
compiler warning about unused variable and thus could fail if
-Werror is present and erroneously proclaim that the macros are
not available.
2018-03-15 20:02:00 +01:00
Vasil Dimov 71129e0265
Do not check for main() in libminiupnpc
main() { main(); } causes "infinite recursion" compilation warning
which with -Werror fails the check.
2018-03-15 19:59:11 +01:00
Wladimir J. van der Laan 05042d38ba
Merge #12666: configure: UniValue 1.0.4 is required for pushKV(, bool)
8172d3a configure: UniValue 1.0.4 is required for pushKV(, bool) (Luke Dashjr)

Pull request description:

  The breaking changes (#12193) are already merged, so this blocks 0.17.0.

  It depends on jgarzik/univalue#42 or jgarzik/univalue#50 being merged and released in UniValue 1.0.4.

Tree-SHA512: 3a21bbc72d6632bd07ee60ad7780b9ee95908357bcf59b4795b693d8a5d8c88943d6451482f11916ff5417e3bdbb9916062f87d0d73e79f50eb95ddabe21f943
2018-03-14 15:22:23 +01:00
Luke Dashjr 8172d3aadb configure: UniValue 1.0.4 is required for pushKV(, bool) 2018-03-10 22:14:04 +00:00
Wladimir J. van der Laan f13d756cdd
Merge #12373: Build: Add build support for profiling.
cfaac2a60 Add build support for 'gprof' profiling. (murrayn)

Pull request description:

  Support for profiling build: `./configure --enable-profiling`

Tree-SHA512: ea983cfce385f1893bb4ab7f94ac141b7d620951dc430da3bbc92ae1357fb05521eac689216e66dc87040171a8a57e76dd7ad98036e12a2896cfe5ab544347f0
2018-03-06 20:21:44 +01:00
murrayn cfaac2a60f Add build support for 'gprof' profiling. 2018-02-26 20:54:16 -08:00
Jonas Schnelli daa84b3354
Merge #12029: Build: Add a makefile target for Doxygen documentation
a777244e4 Build: Add a makefile target for Doxygen documentation (Andrea Comand)

Pull request description:

  You can now build the doxygen documentation with `make docs` and clean it with `make clean-docs`.

  Fixes: #11949

Tree-SHA512: f2361ec7f771227367dd04bba1a444b44e59f13901463a678a5f2f579a10a56d67db2e29552e754e312a1c472a31593b6af189cbaac5cd351a428c57baf5ace7
2018-02-17 18:49:24 +11:00
MarcoFalke 1b06ed136f
Merge #12283: Fix typos
1340eda3b7 Fix typos (practicalswift)

Pull request description:

  Fix typos.

Tree-SHA512: 533a136831387ef26e9a74ba078437496bee38cc026da73fa9e6f6e7f4d5665eccac24cf3ef05e6d3af1329a1214f5ce71b039ddb8378b074e6d4408b8701f95
2018-02-02 05:35:51 -05:00
Wladimir J. van der Laan 4602dc704a
build: Bump version to 0.16.99
Also clean out release notes.

Tree-SHA512: c4d5b52c089e14438be37381e1b0dab3711cc72aa8d345d1024169fff0055f3d021c8ca9d46fb794110694ebcbf7cbca0a12619f650873c9d381530adea7100e
2018-01-30 14:08:53 +01:00
fanquake 11c5827ca7
[build] Add NETBSD leveldb target to configure.ac 2018-01-30 07:48:30 +08:00