fuzzing: Add -lm to LDFLAGS if the coverage sanitizer is used

libFuzzer apparently uses math functions (e.g. ceilf) for that sanitizer.
This commit is contained in:
Tobias Brunner
2018-10-02 10:58:40 +02:00
parent 4a33dcfefc
commit 6e55856830
+3
View File
@@ -1292,6 +1292,9 @@ if test x$fuzzing = xtrue; then
else
# required for libFuzzer
FUZZING_LDFLAGS="-stdlib=libc++ -lstdc++"
if test "$SANITIZER" = "coverage"; then
FUZZING_LDFLAGS="$FUZZING_LDFLAGS -lm"
fi
AC_SUBST(FUZZING_LDFLAGS)
fi
fi