Commit Graph

13 Commits

Author SHA1 Message Date
Elichai Turkel e6692778d3
Modify bitcoin_secp.m4's openssl check to call all the functions that we
use in the tests/benchmarks.
That way linking will fail if those symbols are missing
2020-10-25 13:42:25 +02:00
Pieter Wuille 79f1f7a4f1 Autodetect __int128 availability on the C side
Instead of supporting configuration of the field and scalar size independently,
both are now controlled by the availability of a 64x64->128 bit multiplication
(currently only through __int128). This is autodetected from the C code through
__SIZEOF_INT128__, but can be overridden using configure's
--with-test-override-wide-multiply, or by defining
USE_FORCE_WIDEMUL_{INT64,INT128} manually.
2020-08-10 14:56:39 -07:00
fanquake 84b5fc5bc3
build: fix OpenSSL EC detection on macOS 2020-04-09 17:14:06 +08:00
Alexander Block 31abd3ab8d Support OpenSSL versions >= 1.1 for ENABLE_OPENSSL_TESTS
The only reason OpenSSL 1.1 was not supported was the removal of direct
access to r and s in ECDSA_SIG. This commit adds a simplified version of
ECDSA_SIG_get0 for < 1.1 that can be used like ECDSA_SIG_get0 in >= 1.1
2017-12-28 11:36:24 +01:00
Gregory Maxwell 12de86387f Make the libcrypto detection fail the newer API.
OpenSSL 1.1 makes ECDSA_SIG opaque and our tests need access
inside this object.

The comparison tests against OpenSSL aren't important for most
users, but the build failing is...
2016-12-12 07:56:01 +00:00
Cory Fields 3f8fdfbec1 build: fix x86_64 asm detection for some compilers
I Noticed this on OSX with clang, though it likely happens elsewhere as well.
The result is disabled x86_64 asm.

Due to missing escaping, this $0 was interpreted as the function name
SECP_64BIT_ASM_CHECK, causing the compile-check to be broken on some compilers.

The actual check looked like this:

int main()
{
  uint64_t a = 11, tmp;
  __asm__ __volatile__("movq SECP_64BIT_ASM_CHECKx100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
  return 0;
}

It seems even more odd that it compiled anywhere.
2016-01-04 11:40:00 -05:00
Luke Dashjr 2b4cf416e7 Use pkg-config always when possible, with failover to manual checks for libcrypto 2015-02-13 23:44:07 +00:00
Pieter Wuille 1ba4a60a51 Configure options reorganization 2014-12-13 15:04:28 +01:00
Cory Fields 28ade27da1 build: nuke bashisms 2014-12-11 21:24:35 -05:00
Cory Fields 971fe8151b build: fix openssl detection for cross builds
Make sure that the detected openssl successfully links before enabling support.
2014-12-10 13:21:50 -05:00
Pieter Wuille 67935050e1 Convert YASM code into inline assembly 2014-12-04 13:54:01 +01:00
Cory Fields e2274c58e6 build: osx: attempt to work with homebrew keg-only packages 2014-11-24 11:49:22 -05:00
kiwigb 6fac238f03 Use same build template as bitcoin. Add bitcoin_secp.m4. 2014-11-07 01:55:27 +13:00