Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Jan 2025 18:08:39 GMT
From:      Olivier Certner <olce@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 76d0aed16439 - stable/14 - libprocstat: ZFS support: Makefile: Tidy up a bit
Message-ID:  <202501161808.50GI8dpG092910@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by olce:

URL: https://cgit.FreeBSD.org/src/commit/?id=76d0aed16439c58c4919973436400b067ad434cc

commit 76d0aed16439c58c4919973436400b067ad434cc
Author:     Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2024-12-12 21:37:14 +0000
Commit:     Olivier Certner <olce@FreeBSD.org>
CommitDate: 2025-01-16 18:07:02 +0000

    libprocstat: ZFS support: Makefile: Tidy up a bit
    
    Regroup assignments tweaking preprocessor defines/undefs, and separately
    those about include directories.
    
    Re-order include directories a bit more logically, and remove redundant
    ones.
    
    Separate logical groups by blank lines.
    
    Build artifacts have been verified to stay the same when produced with
    an external LLVM 18 toolchain.
    
    MFC after:      1 month
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D48070
    
    (cherry picked from commit 618c97b87b7124cdfb10d2f33a213c3302c8a98b)
---
 lib/libprocstat/zfs/Makefile | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/lib/libprocstat/zfs/Makefile b/lib/libprocstat/zfs/Makefile
index da689fdd3e81..10448b0bfab9 100644
--- a/lib/libprocstat/zfs/Makefile
+++ b/lib/libprocstat/zfs/Makefile
@@ -6,19 +6,23 @@ OBJS=	zfs_defs.o
 WARNS?=	1
 
 
-CFLAGS+= -DIN_BASE -D__KERNEL__ -D_KERNEL -I. -I${.CURDIR}
+# We fake a kernel compilation environment in order to get the definition for
+# 'zpool_t'.
+CFLAGS+= -DIN_BASE -D__KERNEL__ -D_KERNEL -UKLD_TIED -DKLD_MODULE
+CFLAGS+= -DHAVE_ISSETUGID -D_SYS_VMEM_H_
+
+CFLAGS+= -fno-builtin -nostdlib
+
+CFLAGS+= -I${.CURDIR}
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl
-CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/zfs
+CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/include/os/freebsd
 CFLAGS+= -I${SRCTOP}/sys/contrib/ck/include
-
-CFLAGS+= -I${SRCTOP}/sys -I.  -I..
 CFLAGS+= -I${SRCTOP}/sys/contrib/openzfs/module/icp/include
-CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
-CFLAGS+= -DHAVE_ISSETUGID -D_SYS_VMEM_H_ -UKLD_TIED -DKLD_MODULE
+CFLAGS+= -I${SRCTOP}/sys -I. -I..
 
-CFLAGS+= -fno-builtin -nostdlib
+CFLAGS+= -include ${SRCTOP}/sys/contrib/openzfs/include/os/freebsd/spl/sys/ccompile.h
 
 all: ${OBJS}
 CLEANFILES= ${OBJS}



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