From ad23f625335bc1dc02605539c5cc244935c7b32f Mon Sep 17 00:00:00 2001 From: yperbasis Date: Tue, 18 Mar 2025 22:47:39 +0100 Subject: [PATCH 1/3] third-party: update secp256k1 to v0.6.0 --- third_party/secp256k1/CMakeLists.txt | 20 ++------------------ third_party/secp256k1/secp256k1 | 2 +- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/third_party/secp256k1/CMakeLists.txt b/third_party/secp256k1/CMakeLists.txt index 677325a5fd..e98f8925ee 100644 --- a/third_party/secp256k1/CMakeLists.txt +++ b/third_party/secp256k1/CMakeLists.txt @@ -14,21 +14,5 @@ limitations under the License. ]] -add_library(secp256k1 secp256k1/src/secp256k1.c) -if(MSVC) - target_compile_options(secp256k1 PRIVATE /w) # Not much we can do about warnings -endif() -# cmake-format: off -target_compile_definitions( - secp256k1 - PUBLIC ECMULT_WINDOW_SIZE=15 - ECMULT_GEN_PREC_BITS=4 - ENABLE_MODULE_ECDH - ENABLE_MODULE_RECOVERY -) -# cmake-format: on -target_include_directories( - secp256k1 - PRIVATE secp256k1 - INTERFACE secp256k1/include -) +set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "Enable ECDSA pubkey recovery module." FORCE) +add_subdirectory(secp256k1) diff --git a/third_party/secp256k1/secp256k1 b/third_party/secp256k1/secp256k1 index 1758a92ffd..0cdc758a56 160000 --- a/third_party/secp256k1/secp256k1 +++ b/third_party/secp256k1/secp256k1 @@ -1 +1 @@ -Subproject commit 1758a92ffd896af533b142707e9892ea6e15e5db +Subproject commit 0cdc758a56360bf58a851fe91085a327ec97685a From 4f092320cb750037a558a14d32be784f4577e51a Mon Sep 17 00:00:00 2001 From: GitHub Date: Tue, 18 Mar 2025 21:49:21 +0000 Subject: [PATCH 2/3] make fmt --- third_party/secp256k1/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/third_party/secp256k1/CMakeLists.txt b/third_party/secp256k1/CMakeLists.txt index e98f8925ee..a8710a3208 100644 --- a/third_party/secp256k1/CMakeLists.txt +++ b/third_party/secp256k1/CMakeLists.txt @@ -14,5 +14,8 @@ limitations under the License. ]] -set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "Enable ECDSA pubkey recovery module." FORCE) +set(SECP256K1_ENABLE_MODULE_RECOVERY + ON + CACHE BOOL "Enable ECDSA pubkey recovery module." FORCE +) add_subdirectory(secp256k1) From 48db15a3a0625b2a1ac6432df4a28f755581fdb9 Mon Sep 17 00:00:00 2001 From: yperbasis Date: Fri, 21 Mar 2025 17:57:39 +0100 Subject: [PATCH 3/3] don't build secp256k1 as a shared lib --- third_party/secp256k1/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/third_party/secp256k1/CMakeLists.txt b/third_party/secp256k1/CMakeLists.txt index a8710a3208..d9a8497aac 100644 --- a/third_party/secp256k1/CMakeLists.txt +++ b/third_party/secp256k1/CMakeLists.txt @@ -18,4 +18,8 @@ set(SECP256K1_ENABLE_MODULE_RECOVERY ON CACHE BOOL "Enable ECDSA pubkey recovery module." FORCE ) +set(BUILD_SHARED_LIBS + OFF + CACHE BOOL "Build shared libraries." FORCE +) add_subdirectory(secp256k1)