aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-12-27 15:19:39 +0100
committerMarcoFalke <falke.marco@gmail.com>2019-01-05 19:06:03 +0100
commitfad058a79fe6f8d85e408d1c1954de8b86944039 (patch)
tree6e4ff8086d41798a4aadd893e68a6f47fad8cbe2 /configure.ac
parentfe5a70b9fefa0548f497a749746f53f3d7fd0ebb (diff)
build: Allow to configure --with-sanitizers=fuzzer
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 4b34082270..1319af8c86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -295,7 +295,14 @@ if test x$use_sanitizers != x; then
AX_CHECK_LINK_FLAG(
[[-fsanitize=$use_sanitizers]],
[[SANITIZER_LDFLAGS=-fsanitize=$use_sanitizers]],
- [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])])
+ [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])],
+ [],
+ [AC_LANG_PROGRAM([[
+ #include <cstdint>
+ #include <cstddef>
+ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; }
+ __attribute__((weak)) // allow for libFuzzer linking
+ ]],[[]])])
fi
ERROR_CXXFLAGS=