comparison Makefile.in @ 1351:68e0e396af80 fuzz

Use CXX to link fuzzer, also link with $FUZZLIB
author Matt Johnston <matt@ucc.asn.au>
date Sat, 13 May 2017 23:46:01 +0800
parents 5c2899e35b63
children 66c1cfd5e100
comparison
equal deleted inserted replaced
1350:2722f2347a48 1351:68e0e396af80
229 # exclude svr-main.o to avoid duplicate main 229 # exclude svr-main.o to avoid duplicate main
230 svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs)) 230 svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs))
231 CLANG=clang 231 CLANG=clang
232 232
233 # fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs 233 # fuzzers that don't use libfuzzer, just a standalone harness that feeds inputs
234 fuzzstandalone: LIBS+=fuzz-harness.o 234 fuzzstandalone: FUZZLIB=fuzz-harness.o
235 fuzzstandalone: fuzz-harness.o fuzzers 235 fuzzstandalone: fuzz-harness.o fuzzers
236 236
237 # build all the fuzzers. This will require fail to link unless built with 237 # build all the fuzzers. This will require fail to link unless built with
238 # make fuzzers LIBS=-lFuzzer.a 238 # make fuzzers LIBS=-lFuzzer.a
239 # or similar - the library provides main(). 239 # or similar - the library provides main().
240 fuzzers: fuzzer-preauth 240 fuzzers: fuzzer-preauth
241 241
242 fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs) 242 fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs)
243 $(CC) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o [email protected]$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) @[email protected] 243 $(CXX) $(CXXFLAGS) [email protected] $(LDFLAGS) $(svrfuzzobjs) -o [email protected]$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @[email protected]
244 244
245 # run this to update hardcoded hostkeys for for fuzzing. 245 # run this to update hardcoded hostkeys for for fuzzing.
246 # hostkeys.c is checked in to hg. 246 # hostkeys.c is checked in to hg.
247 fuzz-hostkeys: 247 fuzz-hostkeys:
248 dropbearkey -t rsa -f keyr 248 dropbearkey -t rsa -f keyr