From: Paul Kehrer Date: Mon, 23 Apr 2018 12:21:11 +0000 (-0500) Subject: fix oss-fuzz build with libtiff X-Git-Tag: 7.0.7-29~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cec397f663873aca241dbf802c50b2c24adcfc12;p=imagemagick fix oss-fuzz build with libtiff --- diff --git a/Magick++/fuzz/build.sh b/Magick++/fuzz/build.sh index 20b5cc621..ef8c6c603 100644 --- a/Magick++/fuzz/build.sh +++ b/Magick++/fuzz/build.sh @@ -23,16 +23,22 @@ popd # Build libjpeg-turbo pushd "$SRC/libjpeg-turbo" -cmake . -DCMAKE_INSTALL_PREFIX=$WORK -DENABLE_STATIC=on -DENABLE_SHARED=off +CFLAGS="$CFLAGS -fPIC" cmake . -DCMAKE_INSTALL_PREFIX=$WORK -DENABLE_STATIC=on -DENABLE_SHARED=off make -j$(nproc) make install popd # Build libtiff +# We build shared and static here to make IM's libtiff detection via autoconf more reliable +# The fuzzers themselves link solely against the static build though. pushd "$SRC/libtiff" cmake . -DCMAKE_INSTALL_PREFIX=$WORK make -j$(nproc) make install +git clean -fd +cmake . -DCMAKE_INSTALL_PREFIX=$WORK -DBUILD_SHARED_LIBS=off +make -j$(nproc) +make install popd # Build liblcms2