Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Jul 2022 17:50:01 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 451ac17a5030 - main - stans: Narrow the scope of includes and other flags
Message-ID:  <202207081750.268Ho1ax066183@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=451ac17a50303fec79797e900c7a37914adf9b37

commit 451ac17a50303fec79797e900c7a37914adf9b37
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-07-08 15:42:34 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-07-08 17:47:36 +0000

    stans: Narrow the scope of includes and other flags
    
    CFLAGS+= here affects *ALL* libsa files being built. However, this is
    only needed for zfs.c, so define it only for this. Also, use the defines
    from defs.mk. Move all the zfs.c include hacks together. Also, move the
    -Wformat -Wall warnings that were added to CFLAGS+= to the individual
    files instead for the same reason.
    
    Sponsored by:           Netflix
---
 stand/libsa/zfs/Makefile.inc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/stand/libsa/zfs/Makefile.inc b/stand/libsa/zfs/Makefile.inc
index 841b1b5c327c..f847af8949ff 100644
--- a/stand/libsa/zfs/Makefile.inc
+++ b/stand/libsa/zfs/Makefile.inc
@@ -30,6 +30,7 @@ ZFS_EARLY=	-I${ZFSOSINC}					\
 
 .for i in ${ZFS_SRC} ${ZSTD_SRC}
 CFLAGS.$i+=	-include ${ZFSOSINC}/spl/sys/ccompile.h
+CFLAGS.$i+=	-Wformat -Wall
 .endfor
 
 CFLAGS_EARLY.list.c+= ${ZFS_EARLY}
@@ -39,7 +40,9 @@ CFLAGS_EARLY.zstd_shim.c+= ${ZFS_EARLY}
 # the zfs code that need to be unified.
 CFLAGS.nvlist.c+= -I${ZFSOSINC}/spl
 CFLAGS.zfs.c+=	-I${ZFSOSINC}/spl 				\
-		-I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4
+		-I${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 \
+		-I${ZFSOSINC}/zfs				\
+		-I${OZFS}/include
 
 #
 # ZSTD coding style has some issues, so suppress clang's warnings. Also, zstd's
@@ -53,9 +56,3 @@ CFLAGS.zstd_shim.c+= -DIN_BASE -DIN_LIBSA -I${OZFS}/include
 
 # Do not unroll skein loops, reduce code size
 CFLAGS.skein_block.c+=	-DSKEIN_LOOP=111
-
-CFLAGS+=	-I${SYSDIR}/contrib/openzfs/include
-CFLAGS+=	-I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs
-CFLAGS.zfs.c+=	-I${SYSDIR}/cddl/contrib/opensolaris/common/lz4
-
-CFLAGS+=	-Wformat -Wall



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207081750.268Ho1ax066183>