git: c75e9e027397 - stable/13 - stand: constrain zlib/gzip CFLAGS better
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:10:43 UTC
The branch stable/13 has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=c75e9e027397d06acf71b923965b6094ea9be674
commit c75e9e027397d06acf71b923965b6094ea9be674
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-07-08 16:29:25 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:22 +0000
stand: constrain zlib/gzip CFLAGS better
Define ZLIB_CFLAGS and use it only for the sources that are in ZLIB or
that include it.
Sponsored by: Netflix
(cherry picked from commit 84bf2bbbecc369cea6095bed7a738674b27f8d13)
---
stand/libsa/Makefile | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
index f319645a8072..682fdd9badce 100644
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -96,9 +96,11 @@ SRCS+=${i}
# decompression functionality from zlib
.PATH: ${SRCTOP}/sys/contrib/zlib
-CFLAGS+=-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib
-SRCS+= adler32.c crc32.c
-SRCS+= infback.c inffast.c inflate.c inftrees.c zutil.c
+ZLIB_CFLAGS=-DHAVE_MEMCPY -I${SRCTOP}/sys/contrib/zlib
+.for i in adler32.c crc32.c infback.c inffast.c inflate.c inftrees.c zutil.c
+CFLAGS.${i}+=${ZLIB_CFLAGS}
+SRCS+= ${i}
+.endfor
# lz4 decompression functionality
.PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4
@@ -182,6 +184,8 @@ CFLAGS.ffs_subr.c+= -DSTANDALONE_SMALL
CFLAGS.dosfs.c+= -I${LDRSRC}
CFLAGS.tftp.c+= -I${LDRSRC}
CFLAGS.ufs.c+= -I${LDRSRC}
+CFLAGS.gzipfs.c+= ${ZLIB_CFLAGS}
+CFLAGS.pkgfs.c+= ${ZLIB_CFLAGS}
CFLAGS.bzipfs.c+= -I${SRCTOP}/contrib/bzip2 -DBZ_NO_STDIO -DBZ_NO_COMPRESS
# explicit_bzero and calculate_crc32c