Commit Graph

359 Commits

Author SHA1 Message Date
Homu 877212414a Auto merge of #4745 - nathan-at-least:autoconf-require-prog, r=str4d
configure.ac: Introduce macros to simplify requiring tools.

## what

Introduce two `ZC_REQUIRE_(PROG|TOOL)` macros that are like `AC_PATH_(PROG|TOOL)` except they immediately error out if the target program is not detected.

Then require almost all programs, except for two known optional cases: three programs required only if `--with-lcov` is given, and then `ccache` which has exceptional logic (The equivalent of "--enable-ccache=auto" by default, with explicit 'yes' or 'no' possible, each with different detection needs.)

## why

Provide early explicit errors for build misconfigurations. Hopefully this should never hit our "standard official flow" which relies on the `./zcutil/build.sh` path, though it may come into play for anyone experimenting with the build system or altering dependencies.

### background motivation

While prototyping a nix build system I didn't provide the `cargo` program to the `zcashd` build process. `./configure` happily exited with a success value, but the build system was instantiated with the `CARGO` make / shell variable set to the empty string, which lead to a strange command execution where a long command of `… $CARGO build …` became `…  build …`, so bash looked for a program named `build`. I spent a bit too long looking for where "build" was defined in our dependencies. 😆
2020-11-20 01:03:29 +00:00
Nate Wilcox da081de356 configure.ac: Introduce macros to simplify requiring tools. 2020-11-20 00:59:43 +00:00
Kris Nuttycombe 142328b067 make-release.py: Versioning changes for 4.1.1. 2020-11-16 10:07:07 -07:00
Sean Bowe 75a8a6c25f
make-release.py: Versioning changes for 4.1.0. 2020-11-02 13:38:03 -07:00
therealyingtong f10cf663bc make-release.py: Versioning changes for 4.1.0-rc1. 2020-10-28 02:32:03 +08:00
Jack Grigg 0522f6f0d0 build: Update secp256k1 configure flags 2020-10-22 00:45:25 +01:00
Homu cafc622a22 Auto merge of #4757 - str4d:update-secp256k1, r=str4d
Update secp256k1

This migrates us to the same dependency version that upstream Bitcoin
Core migrated to in bitcoin/bitcoin#19944.

Also enables the endomorphism optimization now that the patents have
expired.
2020-10-21 16:55:47 +00:00
Jack Grigg 9d1a11a0e4 build: Require and build with C++ 17 2020-10-20 13:55:14 +01:00
Jack Grigg 40a5bdfc76 build: Update AX_CXX_COMPILE_STDCXX macro 2020-10-20 13:55:14 +01:00
Jack Grigg 990f77b4c0 build: Use the endomorphism optimization for secp256k1
The relevant patents have now expired:
- US7110538B2 expired 2020-09-25.
- US7995752B2 expired 2020-09-15.
2020-10-01 10:41:26 +01:00
Jack Grigg be7876adbb build: Remove a stray -lcrypto
zcash/zcash#4740 removed OpenSSL from our depends system, so we were
not satisfying this linker flag intentionally. Configurations where a
target OpenSSL could not be found by the linker, such as cross-compiles
and native macOS builds, were therefore failing. However, OpenSSL is
likely available in the system for all the "supported builders" (which
are all Linux-based), so the linker was likely being satisfied by that
library, enabling the previous PR to be merged.
2020-10-01 09:59:02 +01:00
fanquake 0ad49bca44 build: remove OpenSSL detection and libs 2020-09-30 00:40:12 +01:00
fanquake 8993f1f708 build: remove SSL lib detection 2020-09-30 00:40:12 +01:00
Cory Fields 55b4aa1942 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.
2020-09-23 00:07:48 +01:00
Cory Fields f261701265 leveldb: enable runtime-detected crc32 instructions 2020-09-23 00:07:48 +01:00
Cory Fields a0336af870 build: No need to check for leveldb atomics
They're guaranteed with c++11
2020-09-22 23:03:22 +01:00
Cory Fields 58d1bbfe6f leveldb: integrate leveldb into our buildsystem
leveldb's buildsystem causes us a few problems:
- breaks out-of-tree builds
- forces flags used for some tools
- limits cross builds

Rather than continuing to add wrappers around it, simply integrate it into our
build.
2020-09-22 23:01:06 +01:00
Sean Bowe 01d1ea5f0f
make-release.py: Versioning changes for 4.0.0. 2020-09-01 13:28:51 -06:00
Sean Bowe a5d6dbde1e
make-release.py: Versioning changes for 4.0.0-rc1. 2020-08-26 10:09:33 -06:00
Kris Nuttycombe 0391809da1 Remove amqp code and Proton library depenencies & flags. 2020-07-31 13:08:18 -06:00
therealyingtong e4963385a4
make-release.py: Versioning changes for 3.1.0. 2020-07-28 06:54:02 +08:00
therealyingtong 170ea7bda0
make-release.py: Versioning changes for 3.1.0-rc2. 2020-07-15 21:50:12 +08:00
therealyingtong e2be85b3af
make-release.py: Versioning changes for 3.1.0-rc1. 2020-07-14 14:36:44 +08:00
Sean Bowe 306a336a0a
make-release.py: Versioning changes for 3.0.0. 2020-05-22 11:46:19 -06:00
Sean Bowe 7000f452fa
make-release.py: Versioning changes for 3.0.0-rc1. 2020-05-21 07:32:25 -06:00
Sean Bowe f9d4405c09
make-release.py: Versioning changes for 2.1.2-3. 2020-05-08 12:39:13 -06:00
Sean Bowe bdb2df182b
make-release.py: Versioning changes for 2.1.2-2. 2020-05-08 11:41:47 -06:00
Sean Bowe 5d24937e5f
make-release.py: Versioning changes for 2.1.2-1. 2020-05-06 10:50:43 -06:00
Sean Bowe 9eadd525a5
make-release.py: Versioning changes for 2.1.2. 2020-04-22 10:43:50 -06:00
Sean Bowe 2386046941
make-release.py: Versioning changes for 2.1.2-rc1. 2020-04-15 17:45:34 -06:00
Jack Grigg 684e62e903 Fix Rust static library linking for Windows builds
The library renaming step is necessary because the naming convention
used by rustc does not match the naming convention for libtool/MinGW.
2020-03-12 00:50:45 +13:00
Jack Grigg 90f7234136 Replace librustzcash from depends system with src/rust
The --enable-online-rust configure flag replicates the behaviour of the
LIBRUSTZCASH_OVERRIDE environment variable (enabling the build system to
use crates.io instead of vendored dependencies).
2020-03-06 16:49:03 +13:00
Homu e93586a0c4 Auto merge of #4331 - zcash:hotfix-v2.1.1-1, r=ebfull
Hotfix v2.1.1-1

The commits in this PR have been reviewed internally by our team.
2020-02-07 04:50:43 +00:00
Sean Bowe afc553c448
make-release.py: Versioning changes for 2.1.1-1. 2020-02-06 16:51:15 -07:00
Jack Grigg 2e9028f1f1 Move default -g flag into configure.ac behind --enable-debug=no
This ensures that if --enable-debug is set, we correctly use -g3 if it
is available, instead of overriding it.

Part of #4317.
2020-01-31 13:39:38 +00:00
Jack Grigg 999b3a3235 Make -fwrapv conditional on --enable-debug=no
-fwrapv and -ftrapv conflict, and whichever is last takes precedence
(for gcc). This meant that -ftrapv was being ignored when --enable-debug
was set. This commit correctly sets only one of them based on whether
--enable-debug is set.

Part of #4317.
2020-01-31 13:22:07 +00:00
Jack Grigg 42a58f1e23 configure: Change default Proton to match build.sh 2020-01-31 12:12:07 +00:00
Homu 8e8a9350c3 Auto merge of #4222 - str4d:configure-updates, r=str4d
./configure updates

Includes code cherry-picked from the following upstream Bitcoin Core PRs:

- bitcoin/bitcoin#6748
- bitcoin/bitcoin#12373
- bitcoin/bitcoin#12692
- bitcoin/bitcoin#12901
- bitcoin/bitcoin#13005
- bitcoin/bitcoin#13445
- bitcoin/bitcoin#12686
- bitcoin/bitcoin#16435

Part of #2074.
2020-01-30 16:01:48 +00:00
Gavin Andresen d7a20b6373 Simple benchmarking framework
Benchmarking framework, loosely based on google's micro-benchmarking
library (https://github.com/google/benchmark)

Wny not use the Google Benchmark framework? Because adding Even More Dependencies
isn't worth it. If we get a dozen or three benchmarks and need nanosecond-accurate
timings of threaded code then switching to the full-blown Google Benchmark library
should be considered.

The benchmark framework is hard-coded to run each benchmark for one wall-clock second,
and then spits out .csv-format timing information to stdout. It is left as an
exercise for later (or maybe never) to add command-line arguments to specify which
benchmark(s) to run, how long to run them for, how to format results, etc etc etc.
Again, see the Google Benchmark framework for where that might end up.

See src/bench/MilliSleep.cpp for a sanity-test benchmark that just benchmarks
'sleep 100 milliseconds.'

To compile and run benchmarks:
  cd src; make bench

Sample output:

Benchmark,count,min,max,average
Sleep100ms,10,0.101854,0.105059,0.103881
2020-01-22 21:40:35 +00:00
Sean Bowe 5133275342
make-release.py: Versioning changes for 2.1.1. 2020-01-17 10:26:14 -07:00
Sean Bowe 846868f0c7
make-release.py: Versioning changes for 2.1.1-rc2. 2020-01-13 17:55:01 -07:00
Sean Bowe 2c88a156ba
make-release.py: Versioning changes for 2.1.1-rc1. 2020-01-07 20:13:03 -07:00
sandakersmann 0859ea4951
Update _COPYRIGHT_YEAR in configure.ac to 2020 2019-12-27 18:04:14 +01:00
Jack Grigg a89c1058bc
configure: Don't require RELRO and BIND_NOW when cross-compiling darwin 2019-12-10 20:40:28 +00:00
Jack Grigg bbdba3be33
configure: Re-introduce additional sanitizer flags
Re-adds flags that were removed in 72aa644a2a.
2019-11-12 14:07:34 +00:00
Carl Dong 81ddf862f7
autoconf: Sane --enable-debug defaults.
Don't optimize at all when --enable-debug is supplied. This makes sure
that nothing is optimized out.
2019-11-12 13:16:10 +00:00
practicalswift a8780a982e
Add -ftrapv to DEBUG_CXXFLAGS when --enable-debug is used 2019-11-12 13:15:25 +00:00
Chun Kuan Lee 88c9e22eb2
Reset default -g -O2 flags when enable debug 2019-11-12 13:14:52 +00:00
Evan Klitzke 45e203181a
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.
2019-11-12 13:14:23 +00:00
practicalswift 76125f64bc
build: Show enabled sanitizers in configure output 2019-11-12 13:12:08 +00:00