Print enable_fuzz_binary in configure #24336

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2202-buildFuzz changing 1 files +1 −1
  1. MarcoFalke commented at 8:44 AM on February 14, 2022: member

    A disabled enable_fuzz on current master does not mean the the fuzz binary is not compiled. This is confusion, so fix it.

    • enable_fuzz toggles compilation flags for fuzzing and disables all other target. There is no need to print this in the configure result, because the compilation flags are already printed. Also, all other targets are already printed as no.
    • enable_fuzz_binary does what it says it does and is currently not printed. So print it.
  2. in configure.ac:1955 in faa6265f9a outdated
    1950 | @@ -1951,8 +1951,8 @@ if test $enable_fuzz = "no"; then
    1951 |      echo "  with test       = $use_tests"
    1952 |  else
    1953 |      echo "  with test       = not building test_bitcoin because fuzzing is enabled"
    1954 | -    echo "    with fuzz     = $enable_fuzz"
    1955 |  fi
    1956 | +echo "  with fuzz       = $enable_fuzz_binary"
    


    hebasto commented at 8:55 AM on February 14, 2022:

    Just "with fuzz = yes" is still confusing to me. For someone it could be unclear that this message is related to the --enable-fuzz-binary flag. Maybe add "binary" word?


    MarcoFalke commented at 9:22 AM on February 14, 2022:

    thx, fixed

  3. hebasto commented at 8:56 AM on February 14, 2022: member

    Concept ACK.

  4. Print enable_fuzz_binary in configure faef344f84
  5. MarcoFalke force-pushed on Feb 14, 2022
  6. hebasto approved
  7. hebasto commented at 9:36 AM on February 14, 2022: member

    ACK faef344f84a566436ffe2a277dec2cd6c7e1664b, tested on Linux Mint 20.2 (x86_64):

    $ ./configure 2>&1 | grep -i fuzz
      with fuzz binary = yes
      CPPFLAGS        =  -fmacro-prefix-map=$(abs_top_srcdir)=.  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -DPROVIDE_FUZZ_MAIN_FUNCTION
    $ ./configure --disable-fuzz-binary 2>&1 | grep -i fuzz
    configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  '--disable-fuzz-binary' '--disable-shared' '--with-pic' '--enable-benchmark=no' '--enable-module-recovery' '--enable-module-schnorrsig' '--enable-experimental' --cache-file=/dev/null --srcdir=.
      with fuzz binary = no
      CPPFLAGS        =  -fmacro-prefix-map=$(abs_top_srcdir)=.  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -DPROVIDE_FUZZ_MAIN_FUNCTION
    

    Btw, it looks like the setting of the -DPROVIDE_FUZZ_MAIN_FUNCTION flag should be revisited.

  8. MarcoFalke commented at 9:57 AM on February 14, 2022: member

    Btw, it looks like the setting of the -DPROVIDE_FUZZ_MAIN_FUNCTION flag should be revisited.

    Why? A binary needs a main function, otherwise it can't be linked. Maybe create a separate issue if there is one?

  9. DrahtBot added the label Build system on Feb 14, 2022
  10. hebasto commented at 12:01 PM on February 14, 2022: member

    Btw, it looks like the setting of the -DPROVIDE_FUZZ_MAIN_FUNCTION flag should be revisited.

    Why? A binary needs a main function, otherwise it can't be linked. Maybe create a separate issue if there is one?

    See #24337.

  11. MarcoFalke merged this on Feb 15, 2022
  12. MarcoFalke closed this on Feb 15, 2022

  13. MarcoFalke deleted the branch on Feb 15, 2022
  14. sidhujag referenced this in commit 781d8fe668 on Feb 15, 2022
  15. fanquake referenced this in commit 7626e547b8 on Apr 11, 2022
  16. sidhujag referenced this in commit 31ac0a7a1a on Apr 11, 2022
  17. DrahtBot locked this on Feb 15, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:14 UTC

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