build: Fix warnings in x86_64 assembly check #1749

pull hebasto wants to merge 1 commits into bitcoin-core:master from hebasto:250917-assembly-check changing 2 files +4 −3
  1. hebasto commented at 9:59 pm on September 17, 2025: member

    On the master branch @ 10dab907e73ba984deb813e20f6e3fc9ec359a17, the x86_64 assembly check in both the Autotools and CMake build systems can fail depending on externally provided flags. For example:

    0$ env CFLAGS="-Wall -Werror" ./configure --with-asm=x86_64
    1<snip>
    2checking for x86_64 assembly availability... no
    3configure: error: x86_64 assembly requested but not available
    

    or

    0$ env CFLAGS="-Wall -Werror" cmake -B build -DSECP256K1_ASM=x86_64
    1<snip>
    2-- Performing Test HAVE_X86_64_ASM
    3-- Performing Test HAVE_X86_64_ASM - Failed
    4CMake Error at CMakeLists.txt:111 (message):
    5  x86_64 assembly requested but not available.
    6
    7
    8-- Configuring incomplete, errors occurred!
    

    The same issue occurs in CI jobs that build on Windows using clang-cl.

    This PR fixes both build systems.

  2. hebasto renamed this:
    build: Fix `-Wuninitialized` warning in x86_64 assembly check code
    build: Fix `-Wuninitialized` warning in x86_64 assembly check
    on Sep 17, 2025
  3. hebasto force-pushed on Sep 17, 2025
  4. hebasto renamed this:
    build: Fix `-Wuninitialized` warning in x86_64 assembly check
    build: Fix warnings in x86_64 assembly check
    on Sep 17, 2025
  5. in cmake/CheckX86_64Assembly.cmake:7 in 8b75fa0807 outdated
    5@@ -6,8 +6,9 @@ function(check_x86_64_assembly)
    6 
    7     int main()
    


    real-or-random commented at 1:53 pm on September 18, 2025:

    While we’re at it…

    0    int main(void)
    

    hebasto commented at 1:57 pm on September 18, 2025:
    Thanks! Fixed.
  6. real-or-random commented at 1:53 pm on September 18, 2025: contributor
    ACK mod nit
  7. real-or-random added the label build on Sep 18, 2025
  8. real-or-random added the label tweak/refactor on Sep 18, 2025
  9. build: Fix warnings in x86_64 assembly check
    This change fixes:
    - `-Wuninitialized` in both Autotools and CMake;
    - `-Wreturn-type` in CMake only.
    ab560078aa
  10. hebasto force-pushed on Sep 18, 2025
  11. real-or-random approved
  12. real-or-random commented at 1:58 pm on September 18, 2025: contributor
    utACK ab560078aa9c7e977fade4ceae4a20ef8e5be025
  13. furszy commented at 7:53 pm on September 18, 2025: member
    ACK ab560078aa9c7e977fade4ceae4a20ef8e5be025
  14. real-or-random merged this on Sep 19, 2025
  15. real-or-random closed this on Sep 19, 2025

  16. hebasto deleted the branch on Sep 19, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-11-04 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me