From: W. Felix Handte Date: Wed, 5 Jan 2022 20:21:48 +0000 (-0500) Subject: Clean Up Debugging Statements X-Git-Tag: v1.5.2^2~13^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2964%2Fhead;p=thirdparty%2Fzstd.git Clean Up Debugging Statements --- diff --git a/lib/libzstd.mk b/lib/libzstd.mk index e682e446a..73a8cd5d8 100644 --- a/lib/libzstd.mk +++ b/lib/libzstd.mk @@ -101,26 +101,13 @@ FLAGS = $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) ifndef ALREADY_APPENDED_NOEXECSTACK export ALREADY_APPENDED_NOEXECSTACK := 1 ifeq ($(shell echo "int main(int argc, char* argv[]) { (void)argc; (void)argv; return 0; }" | $(CC) $(FLAGS) -z noexecstack -x c -Werror - -o $(VOID) 2>$(VOID) && echo 1 || echo 0),1) -$(info Supports noexecstack linker flag!) -$(info $(LDFLAGS)) LDFLAGS += -z noexecstack -$(info $(LDFLAGS)) -else -$(info Doesn't support noexecstack linker flag!) endif ifeq ($(shell echo | $(CC) $(FLAGS) -Wa,--noexecstack -x assembler -Werror -c - -o $(VOID) 2>$(VOID) && echo 1 || echo 0),1) -$(info Supports noexecstack assembler flag!) -$(info $(CFLAGS)) CFLAGS += -Wa,--noexecstack -$(info $(CFLAGS)) else ifeq ($(shell echo | $(CC) $(FLAGS) -Qunused-arguments -Wa,--noexecstack -x assembler -Werror -c - -o $(VOID) 2>$(VOID) && echo 1 || echo 0),1) # See e.g.: https://github.com/android/ndk/issues/171 -$(info Supports noexecstack assembler flag with unused arg suppression!) -$(info $(CFLAGS)) CFLAGS += -Qunused-arguments -Wa,--noexecstack -$(info $(CFLAGS)) -else -$(info Doesn't support noexecstack assembler flag!) endif endif diff --git a/tests/playTests.sh b/tests/playTests.sh index e1da24a4b..695d4333b 100755 --- a/tests/playTests.sh +++ b/tests/playTests.sh @@ -306,9 +306,7 @@ zstd -d -f tmp.zst --no-check if [ "$isWindows" = false ]; then if [ -n "$(which readelf)" ]; then - println "test: check if binary has executable stack" - file "$ZSTD_BIN" - readelf -lW "$ZSTD_BIN" + println "test: check if binary has executable stack (#2963)" readelf -lW "$ZSTD_BIN" | grep 'GNU_STACK .* RW ' || die "zstd binary has executable stack!" fi fi