From: Nathan Moinvaziri Date: Sat, 2 Apr 2022 21:49:28 +0000 (-0700) Subject: Remove sanitizer support from configure since it is better supported in cmake. Anybod... X-Git-Tag: 2.1.0-beta1~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81d91d6f674ca97b97f7d94dacd728e9ed121ec4;p=thirdparty%2Fzlib-ng.git Remove sanitizer support from configure since it is better supported in cmake. Anybody who still needs it can use cmake or manually set CFLAGS and LDFLAGS. --- diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml index ce367493..25d9b875 100644 --- a/.github/workflows/configure.yml +++ b/.github/workflows/configure.yml @@ -30,21 +30,6 @@ jobs: compiler: gcc configure-args: --warn --zlib-compat --without-optimizations --without-new-strategies - - name: Ubuntu GCC ASAN - os: ubuntu-latest - compiler: gcc - configure-args: --warn --with-sanitizer=address - - - name: Ubuntu GCC MSAN - os: ubuntu-latest - compiler: gcc - configure-args: --warn --with-sanitizer=memory - - - name: Ubuntu GCC No Unaligned UBSAN - os: ubuntu-latest - compiler: gcc - configure-args: --warn --without-unaligned --with-sanitizer=undefined - - name: Ubuntu GCC ARM SF os: ubuntu-latest compiler: arm-linux-gnueabi-gcc diff --git a/README.md b/README.md index 5df00579..e02e04b3 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Build Options | WITH_OPTIM | --without-optimizations | Build with optimisations | ON | | 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_SANITIZER | | Build with sanitizer (memory, address, undefined) | OFF | | WITH_FUZZERS | | Build test/fuzz | OFF | | WITH_BENCHMARKS | | Build test/benchmarks | OFF | | WITH_MAINTAINER_WARNINGS | | Build with project maintainer warnings | OFF | diff --git a/configure b/configure index bf64ae35..aed1909c 100755 --- a/configure +++ b/configure @@ -99,7 +99,6 @@ buildneon=1 builddfltccdeflate=0 builddfltccinflate=0 buildcrc32vx=1 -with_sanitizer="" floatabi= native=0 forcesse2=0 @@ -176,7 +175,6 @@ case "$1" in echo ' [--with-reduced-mem] Reduced memory usage for special cases (reduces performance)' | tee -a configure.log 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 ' [--native] Compiles with full instruction set supported on this host' | tee -a configure.log exit 0 ;; -p*=* | --prefix=*) prefix=$(echo $1 | sed 's/.*=//'); shift ;; @@ -218,7 +216,6 @@ case "$1" in -oldstrat | --without-new-strategies) without_new_strategies=1; shift;; -w* | --warn) warn=1; shift ;; -d* | --debug) debug=1; shift ;; - --with-sanitizer=*) with_sanitizer=$(echo $1 | sed 's/.*=//'); shift ;; *) echo "unknown option: $1" | tee -a configure.log @@ -622,80 +619,6 @@ fi echo >> configure.log -if test "$with_sanitizer" = "address"; then - echo -n "Checking for address sanitizer... " | tee -a configure.log - sanitizers="" - for san in address pointer-compare pointer-subtract; do - if try $CC -c $CFLAGS $test.c -fsanitize=$san ; then - if test -n "$sanitizers"; then - sanitizers="$sanitizers,$san" - else - sanitizers="$san" - fi - fi - done - - if test -n "$sanitizers"; then - echo "-fsanitize=$sanitizers" | tee -a configure.log - CFLAGS="$CFLAGS -fsanitize=$sanitizers" - SFLAGS="$SFLAGS -fsanitize=$sanitizers" - LDFLAGS="$LDFLAGS -fsanitize=$sanitizers" - else - echo No | tee -a configure.log - fi - - echo -n "Checking for leak sanitizer... " | tee -a configure.log - if try $CC -c $CFLAGS $test.c -fsanitize=leak; then - echo "-fsanitize=leak" | tee -a configure.log - CFLAGS="$CFLAGS -fsanitize=leak" - SFLAGS="$SFLAGS -fsanitize=leak" - LDFLAGS="$LDFLAGS -fsanitize=leak" - else - echo No | tee -a configure.log - fi - - echo >> configure.log -fi - -if test "$with_sanitizer" = "memory"; then - echo -n "Checking for memory sanitizer... " | tee -a configure.log - if try $CC -c $CFLAGS $test.c -fsanitize=memory ; then - echo "-fsanitize=memory" | tee -a configure.log - CFLAGS="$CFLAGS -fsanitize=memory" - SFLAGS="$SFLAGS -fsanitize=memory" - LDFLAGS="$LDFLAGS -fsanitize=memory" - else - echo No | tee -a configure.log - fi - - echo >> configure.log -fi - -if test "$with_sanitizer" = "undefined"; then - echo -n "Checking for undefined behavior sanitizer... " | tee -a configure.log - sanitizers="" - for san in array-bounds bool bounds builtin enum float-cast-overflow float-divide-by-zero function integer-divide-by-zero local-bounds null nonnull-attribute object-size pointer-overflow return returns-nonnull-attribute shift shift-base shift-exponent signed-integer-overflow undefined unsigned-integer-overflow unsigned-shift-base vla-bound vptr; do - if try $CC -c $CFLAGS $test.c -fsanitize=$san; then - if test -n "$sanitizers"; then - sanitizers="$sanitizers,$san" - else - sanitizers="$san" - fi - fi - done - - if test -n "$sanitizers"; then - echo "-fsanitize=$sanitizers" | tee -a configure.log - CFLAGS="$CFLAGS -fsanitize=$sanitizers" - SFLAGS="$SFLAGS -fsanitize=$sanitizers" - LDFLAGS="$LDFLAGS -fsanitize=$sanitizers" - else - echo No | tee -a configure.log - fi - - echo >> configure.log -fi - # see if shared library build supported cat > $test.c <