Commit Graph

306 Commits

Author SHA1 Message Date
jc 8e04b9dd54 [build] autoconf adaptions for new files and targets and update dependencies 2018-06-03 09:36:22 -04: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
practicalswift 1340eda3b7 Fix typos 2018-01-28 13:21:25 +01:00
Andrea Comand a777244e48 Build: Add a makefile target for Doxygen documentation
You can now build the doxygen documentation with `make docs` and clean it with `make clean-docs`.

Fixes: #11949
2018-01-25 19:43:19 +01:00
Akira Takizawa c9439e735a [Trivial] Update license year range to 2018 2018-01-01 04:33:09 +09:00
Varunram 3eb4d4595c
[build] Warn that only libconsensus can be built without boost 2017-12-18 14:32:22 +08:00
Cory Fields f7f7e2cd34 threads: add a thread_local autoconf check 2017-11-27 15:01:47 -08:00
Pieter Wuille ef8a634358
Merge #10866: Fix -Wthread-safety-analysis warnings. Compile with -Wthread-safety-analysis if available.
76ea17c79 Add mutex requirement for AddToCompactExtraTransactions(…) (practicalswift)
4616c825a Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror) (practicalswift)
7e319d639 Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost. (Matt Corallo)

Pull request description:

  * Add mutex requirement for `AddToCompactExtraTransactions(…)`.
  * Use `-Wthread-safety-analysis` if available.
  * Rebased on top of https://github.com/TheBlueMatt/bitcoin/commits/2017-08-test-10923 - now includes: Fix -Wthread-safety-analysis warnings. Change the sync.h primitives to std from boost.

Tree-SHA512: fb7365f85daa2741c276a1c899228181a8d46af51db7fbbdffceeaff121a3eb2ab74d7c8bf5e7de879bcc5042d00d24cb4649c312d51caba45a3f6135fd8b38f
2017-11-07 10:36:58 -08:00
practicalswift 4616c825a4 Use -Wthread-safety-analysis if available (+ -Werror=thread-safety-analysis if --enable-werror) 2017-11-06 17:41:02 +01:00
fanquake 223a4aabd3
[build] Don't fail when passed --disable-lcov and lcov isn't available 2017-11-05 14:10:33 +08:00
MarcoFalke fae60e3386 qa: Fix lcov for out-of-tree builds 2017-10-02 13:30:39 +02:00
Wladimir J. van der Laan 38a54a50fa
Merge #11164: Fix boost headers included as user instead of system headers
5ac072caa Fix boost headers included as user instead of system headers (Dan Raviv)

Pull request description:

  In most of the project, boost headers are included as system headers.
  Fix the few inconsistent places where they aren't.

Tree-SHA512: 280af33a7bdc9d68a15b729fa88e1e7627e20a054b8d52a12cc5350c1ac9e9c90fb09f0aa97a00960969f75bcf3403dc52b834c94448b814efa63bfaf3b82663
2017-09-05 22:27:17 +02:00
Wladimir J. van der Laan 538cc0ca8b build: Mention use of asm in summary 2017-08-28 11:19:56 +02:00
Wladimir J. van der Laan ce5381e7fe build: Rename --enable-experimental-asm to --enable-asm and enable by default
Now that 0.15 is branched off, enable assembler SHA256 optimizations by default.
2017-08-28 11:06:11 +02:00
Dan Raviv 5ac072caa2 Fix boost headers included as user instead of system headers
In most of the project, boost headers are included as system headers.
Fix the few inconsistent places where they aren't.
2017-08-26 21:09:00 +03:00
Gregory Sanders 844b73e486 disable jni in builds 2017-08-15 10:27:20 -07:00
Wladimir J. van der Laan f6283b4719
build: bump version to 0.15.99
Now that 0.15 branch has been split off, master is 0.15.99 (pre-0.16).

Also clean out release notes.

Tree-SHA512: 160f712fae7bfc51e49e36a27ab01f5c243b79a19a70312df95f9bc5cb8067c70aa88911f741fd1625bee549a70655eaea24d98f6049d98c3c14ee1b3143f4cb
2017-08-14 17:28:30 +02:00
Wladimir J. van der Laan 318392ca7c
Merge #10301: Check if sys/random.h is required for getentropy.
ee2d10a Check if sys/random.h is required for getentropy on OSX. (James Hilliard)

Pull request description:

  This should check and include sys/random.h if required for osx as mentioned [here](https://github.com/bitcoin/bitcoin/pull/9821#issuecomment-290936636).

Tree-SHA512: e9491f67f2e8b2e6bcdbcbb8063295e844d5627daf5336e3e17b4a8027d888fa65a08e4580a745abdc35ffd8d86b4fc7434daaac172c4a06ab7566a2ed0bfb92
2017-08-07 17:24:55 +02:00
Cory Fields 9baca41985 build: always attempt to enable targeted sse42 cxxflags
This avoids a counter-intuitive drop in performance when manually adjusting the
flags.
2017-08-04 15:43:04 -04:00
James Hilliard ee2d10ad0c Check if sys/random.h is required for getentropy on OSX. 2017-07-27 15:34:09 +03:00
Pieter Wuille 6b8d872e5e Protect SSE4 code behind a compile-time flag 2017-07-20 09:03:53 -07:00
Pieter Wuille b4d03be3ca
Merge #10766: Building Environment: Set ARFLAGS to cr
912da1dcc Use AC_ARG_VAR to set ARFLAGS. (René Nyffenegger)

Pull request description:

  Override the default of ARFLAGS of `cru` to `cr`.

  When building, ar produces a warning for each archive, for example
  ```
    AR       libbitcoin_server.a
  /usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')

  ```
  Since `u` is the default anyway, it cannot hurt to remove it.

Tree-SHA512: 7466764f847b70f0f67db25dac87a7794477abf1997cb946682f394fe80ae86ac3ed52cbadb35f0c18a87467755bde5a5158430444cd26fb60fa363cc7bd486d
2017-07-16 11:56:13 -07:00
René Nyffenegger 912da1dcc8 Use AC_ARG_VAR to set ARFLAGS.
The user can set ARFLAGS in the ./configure step with
  ./configure ARFLAGS=...
If he chooses not to do so, ARFLAGS will be set to cr.
2017-07-15 22:30:58 +02:00
Cory Fields d34d77a51b build: verify that the assembler can handle crc32 functions
Also, enable crc32 even if -msse4.2 wasn't added by us, as long as it works.
This allows custom flags (such as -march=native) to work as expected.
2017-07-13 12:49:05 -04:00
Wladimir J. van der Laan 8c2098ad12
Merge #10565: [coverage] Remove subtrees and benchmarks from coverage report
d5711f4 Filter subtrees and and benchmarks from coverage report (Andrew Chow)
405b86a Replace lcov -r commands with faster way (Andrew Chow)
c8914b9 Have `make cov` optionally include branch coverage statistics (Andrew Chow)

Tree-SHA512: 9c349a7baeb7430ea586617c52f91177df58e3546d6dc573e26815ddb79e30ab1873542d85ac1daca5e1fb2c6d6c8965824b42d027b6b0496a744af57b095852
2017-06-22 20:57:11 +02:00
Wladimir J. van der Laan a4fe07714d
Merge #10544: Update to LevelDB 1.20
3ee3d04 Add extra LevelDB source to Makefile (MarcoFalke)
2424989 leveldb: enable runtime-detected crc32 instructions (Cory Fields)
cf44e4c Squashed 'src/leveldb/' changes from a31c8aa40..196962ff0 (Pieter Wuille)

Tree-SHA512: 19ade77e3f6265507b3ab7b9aa5150d378aa0751e24ac7a61567b0f720a566cedc6c3d3336da17a3bd2b5d068ee86600d96a15228f78bd20ccf98c8fc9041a91
2017-06-13 19:48:13 +02:00
Cory Fields 2424989e4f leveldb: enable runtime-detected crc32 instructions 2017-06-09 19:25:36 -07:00
Andrew Chow c8914b9dbb Have `make cov` optionally include branch coverage statistics
Added an option to configure to allow for branch coverage statistics gathering.

Disabled logprint macro when coverage testing is on so that unnecessary branches are not analyzed.
2017-06-07 14:19:01 -07:00
MarcoFalke 75e898c094
Merge #10331: Share config between util and functional tests
8ad5bde Merge bctest.py into bitcoin-util-test.py (John Newbery)
95836c5 Use shared config file for functional and util tests (John Newbery)
89fcd35 Use an .ini config file for environment vars in bitcoin-util-test.py (John Newbery)
e9265df Change help_text in bitcoin-util-test.py to a docstring. (John Newbery)
ce58e93 Change bitcoin-util-test.py to use Python3 (John Newbery)

Tree-SHA512: 66dab0b4a8546aee0dfaef134a165f1447aff4c0ec335754bbc7d9e55909721c62f09cdbf4b22d02ac1fcd5a9b66780f91e1cc4d8687fae7288cc9072a23a78f
2017-06-06 23:55:24 +02:00
John Newbery 8ad5bdef78 Merge bctest.py into bitcoin-util-test.py
bctest.py is only used as an import by bitcoin-util-test.py. There's no
value in keeping it as a separate module, so let's merge them into a
single module to keep building and packaging simpler.

bitcoin-test-util is importable as a module, so if any future modules
really want to import the code from bctest.py, they can import
bitcoin-test-util and call the bctest functions by name.
2017-06-06 16:42:38 -04:00
Cory Fields cf390dff89 build: silence gcc7's implicit fallthrough warning
This is a well-intentioned but realistically annoying warning. Unfortunately,
it's too easy for a warning in one header to cause dozens of repeated warnings.
2017-05-31 11:54:06 -04:00
John Newbery 95836c5eba Use shared config file for functional and util tests
The functional tests and util tests both require a config file that is
generated by ./configure. This commit merges those two config
files into a single configuration file that can be shared by both tests.

The config from config.ini is put into a Namespace object to maintain
the interface with bctest.py. A future commit could change this
interface to use a dictionary instead of a namespace.
2017-05-03 14:18:30 -04:00
John Newbery 89fcd3586c Use an .ini config file for environment vars in bitcoin-util-test.py 2017-05-03 14:18:14 -04:00