summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-03-04 17:08:21 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-03-04 17:08:21 +0800
commit465bff915a316b53ec46459d12d00fe858fd019c (patch)
tree77d6a6ab12c07e46e7117312409b3f61ef9329ca
parenta4a92b46a72f809ac8c0c364c959f0e52225002a (diff)
downloaddropbear-465bff915a316b53ec46459d12d00fe858fd019c.tar.gz
set up CXX for fuzzing build
-rw-r--r--Makefile.in2
-rw-r--r--configure.ac3
2 files changed, 5 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 479e188..124b0e4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -70,6 +70,8 @@ ifeq (@DROPBEAR_FUZZ@, 1)
dbclientobjs=$(allobjs) cli-main.o
dropbearkeyobjs=$(allobjs) $(KEYOBJS)
dropbearconvertobjs=$(allobjs) $(CONVERTOBJS)
+ # CXX only set when fuzzing
+ CXX=@CXX@
else
dropbearobjs=$(COMMONOBJS) $(CLISVROBJS) $(SVROBJS)
dbclientobjs=$(COMMONOBJS) $(CLISVROBJS) $(CLIOBJS)
diff --git a/configure.ac b/configure.ac
index d1b2602..c0bb8a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -329,6 +329,8 @@ AC_ARG_ENABLE(fuzz,
AC_DEFINE(DROPBEAR_FUZZ, 1, Fuzzing)
AC_MSG_NOTICE(Enabling fuzzing)
DROPBEAR_FUZZ=1
+ # libfuzzer needs linking with c++ libraries
+ AC_PROG_CXX
],
[
AC_DEFINE(DROPBEAR_FUZZ, 0, Fuzzing)
@@ -337,6 +339,7 @@ AC_ARG_ENABLE(fuzz,
)
AC_SUBST(DROPBEAR_FUZZ)
+AC_SUBST(CXX)
# Checks for header files.
AC_HEADER_STDC