diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-10-01 16:21:16 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2017-10-01 16:21:16 -0500 |
commit | edb1f4713921c31d5f467929ce568c6f6b6f5db6 (patch) | |
tree | 95eea7ba699afe211e17ac7e7001e1740b89759c /contrib/oss-fuzz/build.sh | |
parent | 0f9f170e9fdd7681d825527237345f0bf8a7915e (diff) | |
download | libpng-edb1f4713921c31d5f467929ce568c6f6b6f5db6.tar.gz |
[libpng16] Clone zlib into the oss-fuzz zlib project and build zlib alongside libpng.
Diffstat (limited to 'contrib/oss-fuzz/build.sh')
-rwxr-xr-x | contrib/oss-fuzz/build.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/oss-fuzz/build.sh b/contrib/oss-fuzz/build.sh index d2137b13e..300a7e83e 100755 --- a/contrib/oss-fuzz/build.sh +++ b/contrib/oss-fuzz/build.sh @@ -14,12 +14,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Last changed in libpng 1.6.33 [September 28, 2017] +# Last changed in libpng 1.6.35 [October 1, 2017] # -# Revisions by Glenn Randers-Pehson, 2017: +# Revisions by Glenn Randers-Pehrson, 2017: # 1. Build only the library, not the tools (changed "make -j$(nproc) all" to # "make -j$(nproc) libpng16.la"). # 2. Disabled WARNING and WRITE options in pnglibconf.dfa. +# 3. Build zlib alongside libpng ################################################################################ # Disable logging via library build configuration control. @@ -30,14 +31,17 @@ cat scripts/pnglibconf.dfa | \ > scripts/pnglibconf.dfa.temp mv scripts/pnglibconf.dfa.temp scripts/pnglibconf.dfa -# build the library. +# build zlib library. +(cd ../zlib; ./configure; make -j$(nproc) clean; make -j$(nproc) all) + +# build the libpng library. autoreconf -f -i -./configure +CPPFLAGS="-I../zlib" LDFLAGS="-L../zlib" ./configure make -j$(nproc) clean make -j$(nproc) libpng16.la # build libpng_read_fuzzer. -$CXX $CXXFLAGS -std=c++11 -I. \ +$CXX $CXXFLAGS -std=c++11 -I. -I../zlib -L../zlib \ $SRC/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc \ -o $OUT/libpng_read_fuzzer \ -lFuzzingEngine .libs/libpng16.a -lz |