]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
fuzzing: Add -lm to LDFLAGS if the coverage sanitizer is used
authorTobias Brunner <tobias@strongswan.org>
Tue, 2 Oct 2018 08:58:40 +0000 (10:58 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 2 Oct 2018 08:58:40 +0000 (10:58 +0200)
libFuzzer apparently uses math functions (e.g. ceilf) for that sanitizer.

configure.ac

index 673393f8da18ef02a7e5411565a60ae03c1c150c..1ef437389ad88bf626e2721f9f3c01b328ef31da 100644 (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