Commit Graph

10964 Commits

Author SHA1 Message Date
Wladimir J. van der Laan 41b28420d2
devtools: Check for high-entropy ASLR in 64-bit PE executables
check_PE_PIE only checked for DYNAMIC_BASE, this is not enough
for (secure) ASLR on 64-bit.
2017-12-01 14:10:17 +00:00
Anthony Towns d812d95a8f
Add configure check for -latomic 2017-12-01 14:10:16 +00:00
Wladimir J. van der Laan 15472b7d84
build: Remove check for `openssl/ec.h`
We don't use any elliptic curves from OpenSSL anymore, nor include this
header anywhere but optionally in the tests of secp256k1 (which has
its own autoconf setup).

Reported by sinetek on IRC.
2017-12-01 14:10:16 +00:00
Wladimir J. van der Laan 57ab896ba4
test: Remove java comparison tool 2017-12-01 14:10:16 +00:00
Cory Fields d70027148d
build: fix Windows builds without pkg-config
- guard PKG_PROG_PKG_CONFIG with an m4_ifdef. If not building for windows,
  require it
- add nops as necessary in case the ifdef reduces the if/then to nothing
- AC_SUBST some missing _LIBS. These were split out over time, but not all were
  properly substituted. They continued to work if pkg-config is installed
  because it does the AC_SUBST itself
2017-12-01 14:10:16 +00:00
Cory Fields 341ab74532
build: quiet annoying warnings without adding new ones
Disabling warnings can be tricky, because doing so can cause a different
compiler to create new warnings about unsupported disable flags. Also, some
warnings don't surface until they're paired with another warning (gcc). For
example, adding "-Wno-foo" won't cause any trouble, but if there's a legitimate
warning emitted, the "unknown option -Wno-foo" will show up as well.

Work around this in 2 ways:

1. When checking to see if -Wno-foo is supported, check for "-Wfoo" instead.
2. Enable -Werror while checking 1.

If "-Werror -Wfoo" compiles, "-Wno-foo" is almost guaranteed to be supported.

-Werror itself is also checked. If that fails to compile by itself, it likely
means that the user added a flag that adds a warning. In that case, -Werror
won't be used while checking, and the build may be extra noisy. The user would
need to fix the bad input flag.

Also, silence 2 more additional warnings that can show up post-c++11.
2017-12-01 14:10:16 +00:00
Cory Fields c5d645e22f
build: define base filenames for use elsewhere in the buildsystem
Unfortunately, the target namees defined at the Makefile.am level can't be used
for *.in substitution. So these new defines will have to stay synced up with
those targets.

Using the new variables for the deploy targets in the main Makefile.am will
ensure that they stay in sync, otherwise build tests will fail.
2017-12-01 14:10:16 +00:00
daniel 0b2a64f484
add powerpc build support for openssl lib 2017-12-01 14:10:15 +00:00
Jack Grigg ad96d74afe
build: Split hardening/fPIE options out in Zcash-specific binaries 2017-12-01 14:10:11 +00:00
Cory Fields c459de2f03
build: Split hardening/fPIE options out
This allows for fPIE to be used selectively.
2017-11-30 15:17:37 +00:00
Homu 02c4467cb5 Auto merge of #2697 - str4d:darwin-build, r=str4d
Darwin build fixes

Includes fixes cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7136
  - Only the third commit (to avoid a merge conflict)
- bitcoin/bitcoin#7302
  - Excluding the first commit, which is unnecessary (we use Boost 1.62)
- bitcoin/bitcoin#7487
- bitcoin/bitcoin#7606
- bitcoin/bitcoin#7711
- bitcoin/bitcoin#7165
- bitcoin/bitcoin#8002
- bitcoin/bitcoin#8210
  - Only the second commit
- bitcoin/bitcoin#9114
2017-11-30 05:49:07 -08:00
Jack Grigg c6b39fbbd6
Include endian-ness compatibility layer in Equihash implementation 2017-11-29 17:28:44 +00:00
Jack Grigg d3096198c8
[libsnark] Use POSIX-compliant ar arguments 2017-11-29 17:28:44 +00:00
Jack Grigg daad2c2736
Check if OpenMP is available before using it 2017-11-29 17:28:44 +00:00
Jack Grigg 9635679cba
Replace "install -D" with "mkdir -p && install" 2017-11-29 17:26:47 +00:00
Jack Grigg c16188cc6d
Remove manual -std=c++11 flag
This is handled by autoconf now.
2017-11-29 17:24:59 +00:00
fanquake e2e7ca3054
[depends] Set OSX_MIN_VERSION to 10.8 2017-11-29 17:24:59 +00:00
Cory Fields 68ce87eddc
depends: bump OSX toolchain
clang: 3.7.1
cctools: 877.8
ld64: 253.9
2017-11-29 17:24:59 +00:00
fanquake 377092a152
[depends] Add -stdlib=libc++ to darwin CXX flags 2017-11-29 17:24:59 +00:00
Wladimir J. van der Laan a65be83041
build: update ax_cxx_compile_stdcxx to serial 4 2017-11-29 17:24:59 +00:00
Cory Fields 038a858d2f
depends: use c++11 2017-11-29 17:24:59 +00:00
Wladimir J. van der Laan 4ba172369d
build: Enable C++11 build, require C++11 compiler
Implements #6211.
2017-11-29 17:24:59 +00:00
fanquake b08a1f7836
[build-aux] Update Boost & check macros to latest serials 2017-11-29 17:24:59 +00:00
MarcoFalke b0a7ddb0b1
[depends] builders: No need to set -L and --location for curl 2017-11-29 17:24:59 +00:00
Luke Dashjr 7ab7005fbc
Travis: Use Blue Box VMs for IPv6 loopback support 2017-11-29 17:24:59 +00:00
Luke Dashjr a8982ac97d
Bugfix: depends/Travis: Use --location (follow redirects) and --fail [on HTTP error response] with curl 2017-11-29 17:24:59 +00:00
Luke Dashjr bdd12c9b3c
Travis: Use curl rather than wget for Mac SDK 2017-11-29 17:24:59 +00:00
Luke Dashjr bd03cfebec
depends: Use curl for fetching on Linux
Currently Travis's wget fails fetching qrencode:

Fetching qrencode...
ERROR: no certificate subject alternative name matches
	requested host name `fukuchi.org'.
To connect to fukuchi.org insecurely, use `--no-check-certificate'.
OpenSSL: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
Unable to establish SSL connection.
make: *** [/home/travis/build/luke-jr/bitcoin/depends/sources/download-stamps/.stamp_fetched-qrencode-qrencode-3.4.4.tar.bz2.hash] Error 4
2017-11-29 17:24:59 +00:00
Cory Fields 1f623c64b6
c++11: fix libbdb build against libc++ in c++11 mode
atomic_init clashes with
2017-11-29 17:24:59 +00:00
Cory Fields 4bfe8a744b
c++11: CAccountingEntry must be defined before use in a list
c++11ism. This fixes builds against libc++.
2017-11-29 17:24:59 +00:00
Cory Fields 4165af1b73
c++11: don't throw from the reverselock destructor
noexcept is default for destructors as of c++11. By throwing in reverselock's
destructor if it's lock has been tampered with, the likely result is
std::terminate being called. Indeed that happened before this change.

Once reverselock has taken another lock (its ctor didn't throw), it makes no
sense to try to grab or lock the parent lock. That is be broken/undefined
behavior depending on the parent lock's implementation, but it shouldn't cause
the reverselock to fail to re-lock when destroyed.

To avoid those problems, simply swap the parent lock's contents with a dummy
for the duration of the lock. That will ensure that any undefined behavior is
caught at the call-site rather than the reverse lock's destruction.

Barring a failed mutex unlock which would be indicative of a larger problem,
the destructor should now never throw.
2017-11-29 17:24:59 +00:00
MarcoFalke 124e9389af
Fix url in .travis.yml 2017-11-29 17:24:59 +00:00
Homu 06f67834ae Auto merge of #2696 - str4d:macos-build-fixes, r=str4d
Cross-platform build.sh

This enables `zcutil/build.sh` to be used on MacOS, and likely other non-Linux platforms.
2017-11-29 08:35:49 -08:00
Jack Grigg e4cd341260
Replace hard-coded defaults for HOST and BUILD with config.guess 2017-11-29 15:25:14 +00:00
Jack Grigg 7fa05b29b6
Use g-prefixed coreutils commands if they are available
If they are present on the system, it means that the non-prefixed ones are not
necessarily the versions we want, while the prefixed ones are highly likely to
be the ones from GNU Coreutils.
2017-11-29 15:24:21 +00:00
Homu 37ffef4628 Auto merge of #2767 - syd0:cleanup-reserved-include-guards, r=str4d
Get rid of underscore prefixes for include guards.

This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_

This closes #1272
2017-11-29 06:52:52 -08:00
Homu 099bf3dd8f Auto merge of #2763 - syd0:upgrade-libsodium, r=daira
Update libsodium from 1.0.11 to 1.0.15

Closes #2693.
2017-11-28 13:20:13 -08:00
syd e619c21944 Rename bash completion files so that they refer to zcash and not bitcoin.
This closes #2167
2017-11-28 15:24:15 -05:00
Homu 213ac8d1fe Auto merge of #2764 - syd0:remove-old-boost-defines, r=str4d
Remove Boost conditional compilation.

Boost is currently at version 106200 in the depends subsystem
so it is safe to remove code the refers to earlier versions.

This closes #2445
2017-11-28 12:19:27 -08:00
syd 4e4aa5b6ec Get rid of underscore prefixes for include guards.
This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_

This closes #1272
2017-11-28 14:57:58 -05:00
Jack Grigg 7a448d3fa5
Bump secp256k1 subtree 2017-11-28 16:43:13 +00:00
Jack Grigg cde23ac085
Squashed 'src/secp256k1/' changes from 84973d3..6ad5cdb
6ad5cdb Merge #479: Get rid of reserved _t in type names
d1dc9df Get rid of reserved _t in type names
0b70241 Merge #474: Fix header guards using reserved identifiers
ab1f89f Merge #478: Fixed multiple typos
8c7ea22 Fixed multiple typos
abe2d3e Fix header guards using reserved identifiers
f532bdc Merge #459: Add pubkey prefix constants to include/secp256k1.h
cac7c55 Merge #470: Fix wnaf_const documentation
768514b Fix wnaf_const documentation with respect to return value and number of words set
b8c26a3 Merge #458: Fix typo in API documentation
817fb20 Merge #440: Fix typos
12230f9 Merge #468: Remove redundant conditional expression
2e1ccdc Remove redundant conditional expression
bc61b91 add pubkey prefix constants to include/secp256k1.h
b0452e6 Fix typo in API documentation
4c0f32e Fix typo: "Agressive" → "Aggressive"
73aca83 Fix typo: "exectured" → "executed"

git-subtree-dir: src/secp256k1
git-subtree-split: 6ad5cdb42a1a8257289a0423d644dcbdeab0f83c
2017-11-28 16:42:12 +00:00
Homu 2ff8ab7dfb Auto merge of #2751 - syd0:upgrade-googletest-1.8.0, r=str4d
Upgrade googletest to 1.8.0

Closes #1432.
2017-11-28 07:37:20 -08:00
Homu ce72b494b1 Auto merge of #2760 - bitcartel:fix_wallet_test_pipe_error, r=str4d
Fix broken pipe error on some platforms when running QA test wallet.py.

Closes #2759.
2017-11-28 06:33:54 -08:00
Jay Graber 9eb8089e98 Fix cli help result for z_shieldcoinbase 2017-11-27 20:06:36 -08:00
syd d52dcf5d0c InitGoogleMock instead of InitGoogleTest per CR 2017-11-27 11:08:34 -05:00
Homu 9ce4859459 Auto merge of #2766 - syd0:remove-fPowAllowMinDifficultyBlocks, r=str4d
Get rid of consensus.fPowAllowMinDifficultyBlocks.

This closes #1380
2017-11-27 04:06:27 -08:00
Homu 77f4d0505e Auto merge of #2773 - syd0:remove-fp3, r=ebfull
Get rid of fp3 from libsnark, it is not used.

This is for #1544
2017-11-25 17:49:34 -08:00
syd 5163fd9d07 Get rid of fp3 from libsnark, it is not used.
This is for #1544
2017-11-25 15:08:01 -05:00
syd a10c2f46a5 Add gtests to .gitignore 2017-11-25 11:05:01 -05:00