-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Print enable_fuzz_binary in configure #24336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
hebasto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK.
faa6265 to
faef344
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK faef344, 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_FUNCTIONBtw, it looks like the setting of the -DPROVIDE_FUZZ_MAIN_FUNCTION flag should be revisited.
Why? A binary needs a |
See #24337. |
…FUNCTION` macro unconditionally c9c4e6c build: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally (Hennadii Stepanov) Pull request description: No need to define the `PROVIDE_FUZZ_MAIN_FUNCTION` macro when the build system has been configured with the `--disable-fuzz-binary` option. See bitcoin/bitcoin#24336 (review). ACKs for top commit: MarcoFalke: Approach ACK c9c4e6c did not review or test 🐤 fanquake: ACK c9c4e6c Checked that `PROVIDE_FUZZ_MAIN_FUNCTION` isn't defined when configuring with `--disable-fuzz-binary`. Tree-SHA512: 54fbf02ba9f5ecc61b176b8ea7d05e308788d4de3f97ed40913e731300d9dc0edfdfcbf8e0a6e74cf1b2e2ae63f6208a34e03b9c8d203d070c457c4a7d9b5f2c
…` macro unconditionally c9c4e6c build: Do not define `PROVIDE_FUZZ_MAIN_FUNCTION` macro unconditionally (Hennadii Stepanov) Pull request description: No need to define the `PROVIDE_FUZZ_MAIN_FUNCTION` macro when the build system has been configured with the `--disable-fuzz-binary` option. See bitcoin#24336 (review). ACKs for top commit: MarcoFalke: Approach ACK c9c4e6c did not review or test 🐤 fanquake: ACK c9c4e6c Checked that `PROVIDE_FUZZ_MAIN_FUNCTION` isn't defined when configuring with `--disable-fuzz-binary`. Tree-SHA512: 54fbf02ba9f5ecc61b176b8ea7d05e308788d4de3f97ed40913e731300d9dc0edfdfcbf8e0a6e74cf1b2e2ae63f6208a34e03b9c8d203d070c457c4a7d9b5f2c
A disabled
enable_fuzzon current master does not mean the the fuzz binary is not compiled. This is confusion, so fix it.enable_fuzztoggles 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 asno.enable_fuzz_binarydoes what it says it does and is currently not printed. So print it.