[Library] Update zlibng (#1255)

* Update zlibng

* Set cmake path more directly in zlibng to hopefully fix an issue with the build on drone

* I'm dumb, missing / in path

* Mackal helps with a dumb gitignore issue

* Adding all the files, not sure what's ignoring them and im tired of looking

* Some tweaks to zlibng build to hopefully get it to build properly. works on msvc now
This commit is contained in:
Alex
2021-02-23 17:00:26 -08:00
committed by GitHub
parent e6dee96266
commit 2957f5084d
184 changed files with 22029 additions and 11703 deletions
+31 -20
View File
@@ -7,14 +7,15 @@ CFLAGS=
EXE=
SRCDIR=
SRCTOP=
TEST_LDFLAGS=-L.. ../libz.a
LIBNAME=
TEST_LDFLAGS=-L.. ../$(LIBNAME).a
WITH_FUZZERS=
COMPATTESTS =
QEMU_RUN=
QEMU_VER:=$(shell command -v $(QEMU_RUN) --version 2> /dev/null)
all: oldtests cvetests $(COMPATTESTS) fuzzer
all: oldtests cvetests $(COMPATTESTS) fuzzer ghtests
oldtests: #set by ../configure
check_cross_dep:
@@ -45,35 +46,28 @@ fuzzer:
endif
teststatic: check_cross_dep
@TMPST=tmpst_$$; \
if echo hello world | ${QEMU_RUN} ../minigzip$(EXE) | ${QEMU_RUN} ../minigzip$(EXE) -d && ${QEMU_RUN} ../example$(EXE) $$TMPST ; then \
@TMPST=tmpst_$$$$; \
HELLOST=tmphellost_$$$$; \
if echo hello world | ${QEMU_RUN} ../minigzip$(EXE) > $$HELLOST && ${QEMU_RUN} ../minigzip$(EXE) -d < $$HELLOST && ${QEMU_RUN} ../example$(EXE) $$TMPST && ${QEMU_RUN} ../adler32_test$(EXE); then \
echo ' *** zlib test OK ***'; \
else \
echo ' *** zlib test FAILED ***'; exit 1; \
fi
@rm -f tmpst_$$
fi; \
rm -f $$TMPST $$HELLOST
testshared: check_cross_dep
@LD_LIBRARY_PATH=`pwd`/..:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
LD_LIBRARYN32_PATH=`pwd`/..:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
DYLD_LIBRARY_PATH=`pwd`/..:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
SHLIB_PATH=`pwd`/..:$(SHLIB_PATH) ; export SHLIB_PATH; \
TMPSH=tmpsh_$$; \
if echo hello world | ${QEMU_RUN} ../minigzipsh$(EXE) | ${QEMU_RUN} ../minigzipsh$(EXE) -d && ${QEMU_RUN} ../examplesh$(EXE) $$TMPSH; then \
TMPSH=tmpsh_$$$$; \
HELLOSH=tmphellosh_$$$$; \
if echo hello world | ${QEMU_RUN} ../minigzipsh$(EXE) > $$HELLOSH && ${QEMU_RUN} ../minigzipsh$(EXE) -d < $$HELLOSH && ${QEMU_RUN} ../examplesh$(EXE) $$TMPSH && ${QEMU_RUN} ../adler32_testsh$(EXE); then \
echo ' *** zlib shared test OK ***'; \
else \
echo ' *** zlib shared test FAILED ***'; exit 1; \
fi
@rm -f tmpsh_$$
test64: check_cross_dep
@TMP64=tmp64_$$; \
if echo hello world | ${QEMU_RUN} ../minigzip64$(EXE) | ${QEMU_RUN} ../minigzip64$(EXE) -d && ${QEMU_RUN} ../example64$(EXE) $$TMP64; then \
echo ' *** zlib 64-bit test OK ***'; \
else \
echo ' *** zlib 64-bit test FAILED ***'; exit 1; \
fi
@rm -f tmp64_$$
fi; \
rm -f $$TMPSH $$HELLOSH
cvetests: testCVEinputs
@@ -96,10 +90,27 @@ CVE-2003-0107.o: $(SRCDIR)/CVE-2003-0107.c
CVE-2003-0107$(EXE): CVE-2003-0107.o
$(CC) $(CFLAGS) -o $@ CVE-2003-0107.o $(TEST_LDFLAGS)
.PHONY: ghtests
ghtests: testGH-361 testGH-364 testGH-751
.PHONY: testGH-361
testGH-361:
$(QEMU_RUN) ../minigzip$(EXE) -4 <$(SRCDIR)/GH-361/test.txt >/dev/null
switchlevels$(EXE): $(SRCDIR)/switchlevels.c
$(CC) $(CFLAGS) -I.. -I$(SRCTOP) -o $@ $< $(TEST_LDFLAGS)
.PHONY: testGH-364
testGH-364: switchlevels$(EXE)
$(QEMU_RUN) ./switchlevels$(EXE) 1 5 9 3 <$(SRCDIR)/GH-364/test.bin >/dev/null
.PHONY: testGH-751
testGH-751:
$(QEMU_RUN) ../minigzip$(EXE) <$(SRCDIR)/GH-751/test.txt | $(QEMU_RUN) ../minigzip$(EXE) -d >/dev/null
clean:
rm -f *.o *.gcda *.gcno *.gcov
rm -f CVE-2003-0107$(EXE)
rm -f CVE-2003-0107$(EXE) switchlevels$(EXE)
distclean:
rm -f Makefile