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:

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

    or

    $ env CFLAGS="-Wall -Werror" cmake -B build -DSECP256K1_ASM=x86_64
    <snip>
    -- Performing Test HAVE_X86_64_ASM
    -- Performing Test HAVE_X86_64_ASM - Failed
    CMake Error at CMakeLists.txt:111 (message):
      x86_64 assembly requested but not available.
    
    
    -- 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...

        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
  17. fanquake referenced this in commit 42c7d35d3a on Oct 14, 2025
  18. fanquake referenced this in commit 3cbf7cb3e6 on Oct 15, 2025
  19. luke-jr referenced this in commit 1c64b3c054 on Jan 29, 2026
  20. Sjors referenced this in commit d5660d3a13 on Feb 16, 2026
  21. github-actions[bot] referenced this in commit c3f80fff5f on Mar 1, 2026
  22. github-actions[bot] referenced this in commit 4aeff8400e on Mar 1, 2026
  23. github-actions[bot] referenced this in commit 5f15eb0c55 on Mar 1, 2026
  24. 0x000000000019d6689c085ae165831e934ff76 referenced this in commit d54574beca on Mar 2, 2026
  25. csjones referenced this in commit fb3e16af04 on Mar 2, 2026
  26. real-or-random referenced this in commit 56751a4cf0 on Mar 2, 2026
  27. 0x000000000019d6689c085ae165831e934ff76 referenced this in commit 924c279a64 on Mar 2, 2026
  28. csjones referenced this in commit bf90997db1 on Mar 2, 2026
  29. vmta referenced this in commit 1ddc2f947f on Apr 26, 2026
  30. vmta referenced this in commit 56c40fe100 on Apr 27, 2026

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: 2026-05-19 06:52 UTC