From: Paul Kehrer Date: Mon, 15 Jan 2018 17:20:39 +0000 (-0600) Subject: more linking... X-Git-Tag: 7.0.7-22~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0b421bca8cdc3e45016e1ecf9c79bead775e6ff;p=imagemagick more linking... --- diff --git a/.travis/build_fuzzers.sh b/.travis/build_fuzzers.sh index 6415b7f05..71b3d6e10 100755 --- a/.travis/build_fuzzers.sh +++ b/.travis/build_fuzzers.sh @@ -4,7 +4,7 @@ set -e set -x MAGICKINCLUDE="appdir/usr/include/ImageMagick-7" -MAGICKSTATICLIBS="appdir/usr/lib/libMagick++-7.Q16.a appdir/usr/lib/libMagickWand-7.Q16.a appdir/usr/lib/libMagickCore-7.Q16.a libfuzzer/libFuzzer.a" +MAGICKFUZZERLIBS="-Lappdir/usr/lib -lz -lpng -lfontconfig -lxcb -lX11 -lXext -lbz2 -ljpeg -ljbig -lIlmImf -ldjvulibre -ltiff -llqr-1 -lwmf -lwmflite -lraqm -lxml2 -llzma -llcms2 -lpthread -lfreetype -lMagick++-7.Q16 -lMagickWand-7.Q16 -lMagickCore-7.Q16 libfuzzer/libFuzzer.a" # Checkout and build libFuzzer svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer libfuzzer @@ -15,7 +15,7 @@ popd clang++ -std=c++11 -I$MAGICKINCLUDE "Magick++/fuzz/encoder_list.cc" \ -o "encoder_list" \ - -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 $MAGICKSTATICLIBS -lpthread -lfreetype + -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 $MAGICKFUZZERLIBS for f in Magick++/fuzz/*_fuzzer.cc; do fuzzer=$(basename "$f" _fuzzer.cc) @@ -25,12 +25,11 @@ for f in Magick++/fuzz/*_fuzzer.cc; do fi clang++ -std=c++11 -I$MAGICKINCLUDE \ "$f" -o "${fuzzer}_fuzzer" \ - -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 $MAGICKSTATICLIBS -lpthread-lfreetype + -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 $MAGICKFUZZERLIBS done -for encoder in $("./encoder_list"); do - clang++ -std=c++11 -I$MAGICKINCLUDE \ - "Magick++/fuzz/encoder_fuzzer.cc" -o "encoder_${encoder,,}_fuzzer" \ - -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 \ - "-DFUZZ_IMAGEMAGICK_ENCODER=$encoder" $MAGICKSTATICLIBS -lpthread -lfreetype -done +# Build one encoder to confirm it works +clang++ -std=c++11 -I$MAGICKINCLUDE \ + "Magick++/fuzz/encoder_fuzzer.cc" -o "encoder_wmf_fuzzer" \ + -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 \ + "-DFUZZ_IMAGEMAGICK_ENCODER=WMF" $MAGICKFUZZERLIBS