From 7106d57eeb70c7161c381d36d8db031c6dcd8a59 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 8 Jul 2021 20:02:42 +0000 Subject: [PATCH] In recent libz update, tb@ overzealously attempted codesize reduction with option BUILDFIXED -- which is incompatible with kernel hibernate unpack since it places side-effects into BSS, rather than inside z_streamp or using the private allocator. While here DYNAMIC_CRC_TABLE could cause similar problems, so disable this also. Space savings for the media is best done with bootblock-specific libz compile options, coming in the following commit. ok tb mlarkin --- sys/lib/libz/Makefile | 5 ++--- sys/lib/libz/zutil.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/lib/libz/Makefile b/sys/lib/libz/Makefile index f24d2193c04..960543d33d9 100644 --- a/sys/lib/libz/Makefile +++ b/sys/lib/libz/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.9 2021/07/04 14:24:49 tb Exp $ +# $OpenBSD: Makefile,v 1.10 2021/07/08 20:02:42 deraadt Exp $ # $NetBSD: Makefile,v 1.2 1997/01/22 01:36:30 cgd Exp $ LIB= z @@ -6,8 +6,7 @@ NOPIC= NOPROFILE= # Tweak knobs to generate small libz code -CPPFLAGS+= -DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE -CPPFLAGS+= -DBUILDFIXED +CPPFLAGS+= -DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP CPPFLAGS+= -I. ${ZCPPFLAGS} # files to be copied down from libz. diff --git a/sys/lib/libz/zutil.h b/sys/lib/libz/zutil.h index ebbc14a850f..061234b12aa 100644 --- a/sys/lib/libz/zutil.h +++ b/sys/lib/libz/zutil.h @@ -1,4 +1,4 @@ -/* $OpenBSD: zutil.h,v 1.20 2021/07/04 17:41:23 tb Exp $ */ +/* $OpenBSD: zutil.h,v 1.21 2021/07/08 20:02:42 deraadt Exp $ */ /* zutil.h -- internal interface and configuration of the compression library * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler @@ -25,7 +25,6 @@ #include #include -#define BUILDFIXED #define MY_ZCALLOC #define NOBYFOUR -- 2.20.1