Update to zopfli-1.0.2.

This version should build, and work on m88k.

jca@ gave it a try on sparc64, where it crashes (SIGBUS), and fixed the
issue. Thanks!

OK jca@
This commit is contained in:
bket 2018-06-09 18:38:18 +00:00
parent 61959b1e02
commit 197b2f9bc1
4 changed files with 36 additions and 12 deletions

View File

@ -1,13 +1,10 @@
# $OpenBSD: Makefile,v 1.4 2017/04/18 13:09:23 sthen Exp $
# __builtin_clz
NOT_FOR_ARCHS= ${GCC3_ARCHS}
# $OpenBSD: Makefile,v 1.5 2018/06/09 18:38:18 bket Exp $
COMMENT = deflate-compatible compression format
GH_ACCOUNT = google
GH_PROJECT = zopfli
GH_TAGNAME = zopfli-1.0.1
GH_TAGNAME = zopfli-1.0.2
DISTNAME = ${GH_TAGNAME}
CATEGORIES = archivers

View File

@ -1,2 +1,2 @@
SHA256 (zopfli-1.0.1.tar.gz) = KXQ9cnpODs0bk+C/iUds7rZi6AmrLmqwB6CwNEgA6bQ=
SIZE (zopfli-1.0.1.tar.gz) = 128178
SHA256 (zopfli-1.0.2.tar.gz) = SlcDB8NxctiU7E75O26OOqzEAeeMvMUc+FshLbw3mlU=
SIZE (zopfli-1.0.2.tar.gz) = 136035

View File

@ -1,13 +1,14 @@
$OpenBSD: patch-Makefile,v 1.1 2017/04/18 13:09:23 sthen Exp $
--- Makefile.orig Tue Apr 18 14:06:16 2017
+++ Makefile Tue Apr 18 14:06:23 2017
$OpenBSD: patch-Makefile,v 1.2 2018/06/09 18:38:18 bket Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -1,8 +1,8 @@
CC = gcc
CXX = g++
-CFLAGS = -W -Wall -Wextra -ansi -pedantic -lm -O2
-CFLAGS = -W -Wall -Wextra -ansi -pedantic -lm -O2 -Wno-unused-function
-CXXFLAGS = -W -Wall -Wextra -ansi -pedantic -O2
+CFLAGS = -W -Wall -Wextra -ansi -pedantic -lm $(COPTFLAGS)
+CFLAGS = -W -Wall -Wextra -ansi -pedantic -lm $(COPTFLAGS) -Wno-unused-function
+CXXFLAGS = -W -Wall -Wextra -ansi -pedantic $(COPTFLAGS)
ZOPFLILIB_SRC = src/zopfli/blocksplitter.c src/zopfli/cache.c\

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-src_zopfli_lz77_c,v 1.1 2018/06/09 18:38:18 bket Exp $
Unbreak on architectures with strict alignement requirements.
Index: src/zopfli/lz77.c
--- src/zopfli/lz77.c.orig
+++ src/zopfli/lz77.c
@@ -299,6 +299,7 @@ static const unsigned char* GetMatch(const unsigned ch
const unsigned char* end,
const unsigned char* safe_end) {
+#ifndef __STRICT_ALIGNMENT
if (sizeof(size_t) == 8) {
/* 8 checks at once per array bounds check (size_t is 64-bit). */
while (scan < safe_end && *((size_t*)scan) == *((size_t*)match)) {
@@ -312,7 +313,9 @@ static const unsigned char* GetMatch(const unsigned ch
scan += 4;
match += 4;
}
- } else {
+ } else
+#endif /* ! __STRICT_ALIGNMENT */
+ {
/* do 8 checks at once per array bounds check. */
while (scan < safe_end && *scan == *match && *++scan == *++match
&& *++scan == *++match && *++scan == *++match