Currently, arm32 assembly gets only compiled if explicitly set via SECP256K1_ASM=arm32
. When SECP256K1_ASM
is set to AUTO
, then the detection script only checks for x86 assembly. I propose adding check_arm32_assembly()
also in the AUTO
branch. see https://github.com/bitcoin/bitcoin/issues/32832#issuecomment-3268056766.
This is the current snippet for reference:
0set(SECP256K1_ASM "AUTO" CACHE STRING "Assembly to use: \"AUTO\", \"OFF\", \"x86_64\" or \"arm32\" (experimental). [default=AUTO]")
1set_property(CACHE SECP256K1_ASM PROPERTY STRINGS "AUTO" "OFF" "x86_64" "arm32")
2check_string_option_value(SECP256K1_ASM)
3if(SECP256K1_ASM STREQUAL "arm32")
4 enable_language(ASM)
5 include(CheckArm32Assembly)
6 check_arm32_assembly()
7 if(HAVE_ARM32_ASM)
8 add_compile_definitions(USE_EXTERNAL_ASM=1)
9 else()
10 message(FATAL_ERROR "ARM32 assembly requested but not available.")
11 endif()
12elseif(SECP256K1_ASM)
13 include(CheckX86_64Assembly)
14 check_x86_64_assembly()
15 if(HAVE_X86_64_ASM)
16 set(SECP256K1_ASM "x86_64")
17 add_compile_definitions(USE_ASM_X86_64=1)
18 elseif(SECP256K1_ASM STREQUAL "AUTO")
19 set(SECP256K1_ASM "OFF")
20 else()
21 message(FATAL_ERROR "x86_64 assembly requested but not available.")
22 endif()
23endif()