]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Remove support for building fuzzers from configure.
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 31 Mar 2022 16:50:52 +0000 (09:50 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sun, 3 Apr 2022 14:28:58 +0000 (16:28 +0200)
Makefile.in
README.md
configure
test/Makefile.in

index 2b8269099b6bb8072726ad54aac2149d2576af83..96bb93828f8893b3bddcec95561b65a133a6460e 100644 (file)
@@ -154,7 +154,7 @@ PIC_OBJS = $(PIC_OBJC)
 
 all: static shared
 
-static: example$(EXE) minigzip$(EXE) fuzzers makefixed$(EXE) maketrees$(EXE) makecrct$(EXE)
+static: example$(EXE) minigzip$(EXE) makefixed$(EXE) maketrees$(EXE) makecrct$(EXE)
 
 shared: examplesh$(EXE) minigzipsh$(EXE)
 
@@ -177,59 +177,6 @@ $(ARCHDIR)/%.lo: $(SRCDIR)/$(ARCHDIR)/%.c
 test: all
        $(MAKE) -C test
 
-# This variable is set by configure.
-WITH_FUZZERS=
-
-# By default, use our own standalone_fuzz_target_runner.
-# This runner does no fuzzing, but simply executes the inputs
-# provided via parameters.
-# Run e.g. "make all LIB_FUZZING_ENGINE=/path/to/libFuzzer.a"
-# to link the fuzzer(s) against a real fuzzing engine.
-ifeq (,$(LIB_FUZZING_ENGINE))
-  LIB_FUZZING_ENGINE = standalone_fuzz_target_runner.o
-else
-  # OSS-Fuzz will define its own value for LIB_FUZZING_ENGINE.
-  WITH_FUZZERS=1
-endif
-
-ifeq (1,$(WITH_FUZZERS))
-fuzzers: fuzzer_checksum$(EXE) fuzzer_compress$(EXE) fuzzer_example_small$(EXE) fuzzer_example_large$(EXE) fuzzer_example_flush$(EXE) fuzzer_example_dict$(EXE) fuzzer_minigzip$(EXE)
-else
-fuzzers:
-endif
-
-# The standalone fuzz target runner.
-standalone_fuzz_target_runner.o:
-       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-fuzzer_checksum.o:
-       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-fuzzer_compress.o:
-       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-fuzzer_example_small.o:
-       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-fuzzer_example_large.o:
-       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-fuzzer_example_flush.o:
-       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-fuzzer_example_dict.o:
-       $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
-fuzzer_minigzip.o:
-       $(CC) $(CFLAGS) -DWITH_GZFILEOP $(INCLUDES) -c -o $@ $<
-fuzzer_checksum$(EXE): fuzzer_checksum.o standalone_fuzz_target_runner.o $(STATICLIB)
-       $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) fuzzer_checksum.o $(STATICLIB) -lpthread
-fuzzer_compress$(EXE): fuzzer_compress.o standalone_fuzz_target_runner.o $(STATICLIB)
-       $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) fuzzer_compress.o $(STATICLIB) -lpthread
-fuzzer_example_small$(EXE): fuzzer_example_small.o standalone_fuzz_target_runner.o $(STATICLIB)
-       $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) fuzzer_example_small.o $(STATICLIB) -lpthread
-fuzzer_example_large$(EXE): fuzzer_example_large.o standalone_fuzz_target_runner.o $(STATICLIB)
-       $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) fuzzer_example_large.o $(STATICLIB) -lpthread
-fuzzer_example_flush$(EXE): fuzzer_example_flush.o standalone_fuzz_target_runner.o $(STATICLIB)
-       $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) fuzzer_example_flush.o $(STATICLIB) -lpthread
-fuzzer_example_dict$(EXE): fuzzer_example_dict.o standalone_fuzz_target_runner.o $(STATICLIB)
-       $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) fuzzer_example_dict.o $(STATICLIB) -lpthread
-fuzzer_minigzip$(EXE): fuzzer_minigzip.o standalone_fuzz_target_runner.o $(OBJG) $(STATICLIB)
-       $(CC) $(LDFLAGS) -o $@ $(LIB_FUZZING_ENGINE) fuzzer_minigzip.o $(OBJG) $(STATICLIB) -lpthread
-
 infcover.o: $(SRCDIR)/test/infcover.c zlib$(SUFFIX).h zconf$(SUFFIX).h zlib_name_mangling$(SUFFIX).h
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/test/infcover.c
 
@@ -410,7 +357,7 @@ clean:
        @if [ -f $(ARCHDIR)/Makefile ]; then $(MAKE) -C $(ARCHDIR) clean; fi
        @if [ -f test/Makefile ]; then $(MAKE) -C test clean; fi
        rm -f *.o *.lo *~ \
-          example$(EXE) minigzip$(EXE) minigzipsh$(EXE) fuzzer_*$(EXE) \
+          example$(EXE) minigzip$(EXE) minigzipsh$(EXE) \
           infcover makefixed$(EXE) maketrees$(EXE) makecrct$(EXE) \
           $(STATICLIB) $(IMPORTLIB) $(SHAREDLIB) $(SHAREDLIBV) $(SHAREDLIBM) \
           foo.gz so_locations \
index b0842bc442c3f83715d860ca1778d9201038d030..f178ed54043a3ff25f902d09f2d03a374c34d54e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -120,7 +120,7 @@ Build Options
 | WITH_NEW_STRATEGIES      | --without-new-strategies | Use new strategies                                                                    | ON      |
 | WITH_NATIVE_INSTRUCTIONS | --native                 | Compiles with full instruction set supported on this host (gcc/clang -march=native)   | OFF     |
 | WITH_SANITIZER           | --with-sanitizer         | Build with sanitizer (memory, address, undefined)                                     | OFF     |
-| WITH_FUZZERS             | --with-fuzzers           | Build test/fuzz                                                                       | OFF     |
+| WITH_FUZZERS             |                          | Build test/fuzz                                                                       | OFF     |
 | WITH_BENCHMARKS          |                          | Build test/benchmarks                                                                 | OFF     |
 | WITH_MAINTAINER_WARNINGS |                          | Build with project maintainer warnings                                                | OFF     |
 | WITH_CODE_COVERAGE       |                          | Enable code coverage reporting                                                        | OFF     |
index b8216abf9729eeed35c813122530f25df82ba68f..bf64ae35d135198d171ea647055a6ef6f17062a3 100755 (executable)
--- a/configure
+++ b/configure
@@ -100,7 +100,6 @@ builddfltccdeflate=0
 builddfltccinflate=0
 buildcrc32vx=1
 with_sanitizer=""
-with_fuzzers=0
 floatabi=
 native=0
 forcesse2=0
@@ -178,7 +177,6 @@ case "$1" in
       echo '    [--force-sse2]              Assume SSE2 instructions are always available (disabled by default on x86, enabled on x86_64)' | tee -a configure.log
       echo '    [--force-tzcnt]             Assume TZCNT instructions are always available (disabled by default)' | tee -a configure.log
       echo '    [--with-sanitizer]          Build with sanitizer (memory, address, undefined)' | tee -a configure.log
-      echo '    [--with-fuzzers]            Build test/fuzz (disabled by default)' | tee -a configure.log
       echo '    [--native]                  Compiles with full instruction set supported on this host' | tee -a configure.log
         exit 0 ;;
     -p*=* | --prefix=*) prefix=$(echo $1 | sed 's/.*=//'); shift ;;
@@ -221,7 +219,6 @@ case "$1" in
     -w* | --warn) warn=1; shift ;;
     -d* | --debug) debug=1; shift ;;
     --with-sanitizer=*) with_sanitizer=$(echo $1 | sed 's/.*=//'); shift ;;
-    --with-fuzzers) with_fuzzers=1; shift ;;
 
     *)
       echo "unknown option: $1" | tee -a configure.log
@@ -2043,7 +2040,6 @@ if [ "$SRCDIR" != "$BUILDDIR" ]; then INCLUDES="-I$BUILDDIR ${INCLUDES}"; fi
 sed < $SRCDIR/Makefile.in "
 /^CC *=/s#=.*#=$CC#
 /^CFLAGS *=/s#=.*#=$CFLAGS#
-/^WITH_FUZZERS *=/s#=.*#=$with_fuzzers#
 /^SFLAGS *=/s#=.*#=$SFLAGS#
 /^LDFLAGS *=/s#=.*#=$LDFLAGS#
 /^LDSHARED *=/s#=.*#=$LDSHARED#
@@ -2211,7 +2207,6 @@ sed < $SRCDIR/test/Makefile.in "
 /^SRCDIR *=/s#=.*#=$SRCDIR/test#
 /^SRCTOP *=/s#=.*#=$SRCDIR#
 /^QEMU_RUN *=/s#=.*#=$QEMU_RUN#
-/^WITH_FUZZERS *=/s#=.*#=$with_fuzzers#
 /^LIBNAME *=/s#=.*#=$LIBNAME#
 " > test/Makefile
 
index 00050798b4c059c96e3da516902748913793e968..4078d60d458d5d1f950bdbca0d0e3418965d5de5 100644 (file)
@@ -9,12 +9,11 @@ SRCDIR=
 SRCTOP=
 LIBNAME=
 TEST_LDFLAGS=-L.. ../$(LIBNAME).a
-WITH_FUZZERS=
 
 QEMU_RUN=
 QEMU_VER:=$(shell command -v $(QEMU_RUN) --version 2> /dev/null)
 
-all: oldtests cvetests fuzzer ghtests
+all: oldtests cvetests ghtests
 
 oldtests: #set by ../configure
 check_cross_dep:
@@ -26,24 +25,6 @@ endif
 
 ALL_SRC_FILES := $(wildcard ../*)
 
-# Only check the fuzzer when it is a stand-alone executable.
-ifneq (,$(LIB_FUZZING_ENGINE))
-fuzzer:
-else
- ifeq (0,$(WITH_FUZZERS))
-fuzzer:
- else
-fuzzer:
-       @${QEMU_RUN} ../fuzzer_checksumr$(EXE) $(ALL_SRC_FILES) && \
-       ${QEMU_RUN} ../fuzzer_compress$(EXE) $(ALL_SRC_FILES) && \
-       ${QEMU_RUN} ../fuzzer_example_small$(EXE) $(ALL_SRC_FILES) && \
-       ${QEMU_RUN} ../fuzzer_example_large$(EXE) $(ALL_SRC_FILES) && \
-       ${QEMU_RUN} ../fuzzer_example_flush$(EXE) $(ALL_SRC_FILES) && \
-       ${QEMU_RUN} ../fuzzer_example_dict$(EXE) $(ALL_SRC_FILES) && \
-       ${QEMU_RUN} ../fuzzer_minigzip$(EXE) $(ALL_SRC_FILES)
- endif
-endif
-
 teststatic: check_cross_dep
        @TMPST=tmpst_$$$$; \
        HELLOST=tmphellost_$$$$; \