diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2020-03-22 16:05:40 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2020-03-22 16:22:13 +0300 |
commit | af7725c8060a8f1dd0716394f42205b5ad50bd42 (patch) | |
tree | f05c83349d8be5bc9aa796daf29fb8fb831e0f8a | |
parent | 7fa4d8efcaecac06ebd38f3a4aa392ab76c721e4 (diff) | |
download | gnutls-af7725c8060a8f1dd0716394f42205b5ad50bd42.tar.gz |
oss-fuzz: use CC rather than CXX to compile fuzzers
clang++ will choke on several fuzzer sources because C++ is stricter
than C wrt. type conversion:
gnutls_base64_decoder_fuzzer.c:26:63: error: non-constant-expression
cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'unsigned
int' in initializer list [-Wc++11-narrowing]
gnutls_datum_t raw = {.data = (unsigned char *)data, .size = size};
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
-rw-r--r-- | fuzz/Makefile.am | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am index 61a3a6b997..37c96f8286 100644 --- a/fuzz/Makefile.am +++ b/fuzz/Makefile.am @@ -88,8 +88,9 @@ oss-fuzz: for ccfile in *_fuzzer.c; do \ fuzzer=$$(basename $$ccfile .c); \ XLIBS="-lhogweed -lnettle -ltasn1 -lgmp -lidn2 -lunistring"; \ - $$CXX $$CXXFLAGS -I$(top_srcdir)/lib/includes/ -I$(top_srcdir) \ - "$${fuzzer}.c" -o "$${fuzzer}" \ + $$CC $$CFLAGS -I$(top_srcdir)/lib/includes/ -I$(top_srcdir) \ + -c "$${fuzzer}.c" -o "$${fuzzer}.o" ; \ + $$CXX $$CXXFLAGS "$${fuzzer}.o" -o "$${fuzzer}" \ ../lib/.libs/libgnutls.a $${LIB_FUZZING_ENGINE} \ -Wl,-Bstatic \ $${XLIBS} \ |