mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
cddl/*: add a WITH(OUT)_DTRACE option
Add an option to enable/disable DTrace without disabling ZFS. New architectures such as CHERI may support ZFS before they support DTrace and the old model of WITHOUT_CDDL disabling both wasn't helpful. For compatiblity, the CDDL option remains and WITHOUT_CDDL implies WITHOUT_DTRACE. WITHOUT_DTRACE also implies WITHOUT_CTF. As part of this change, largely convert cddl/*/Makefile to using the more compact SUBDIR.${MK_<FOO>}+= form rather than using intermediate variables. Reviewed by: markj Obtained from: CheriBSD Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D35718
This commit is contained in:
parent
513e1bbc73
commit
3bf6636512
|
@ -2,39 +2,32 @@
|
||||||
|
|
||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
|
|
||||||
SUBDIR= drti \
|
.if ${MK_DTRACE} == yes || ${MK_ZFS} == yes
|
||||||
libavl \
|
SUBDIR= libspl
|
||||||
|
.endif
|
||||||
|
|
||||||
|
SUBDIR.${MK_DTRACE}+= \
|
||||||
|
drti \
|
||||||
libctf \
|
libctf \
|
||||||
libdtrace \
|
libdtrace
|
||||||
${_libicp} \
|
|
||||||
${_libicp_rescue} \
|
|
||||||
libnvpair \
|
|
||||||
libspl \
|
|
||||||
${_libtpool} \
|
|
||||||
libumem \
|
|
||||||
libuutil \
|
|
||||||
${_libzfs_core} \
|
|
||||||
${_libzfs} \
|
|
||||||
${_libzfsbootenv} \
|
|
||||||
${_libzpool} \
|
|
||||||
${_libzutil} \
|
|
||||||
${_pam_zfs_key}
|
|
||||||
|
|
||||||
SUBDIR.${MK_TESTS}+= tests
|
SUBDIR.${MK_TESTS}+= tests
|
||||||
|
|
||||||
.if ${MK_ZFS} != "no"
|
SUBDIR.${MK_ZFS}+= \
|
||||||
_libzfs_core= libzfs_core
|
libavl \
|
||||||
_libicp= libicp
|
libicp \
|
||||||
_libicp_rescue= libicp_rescue
|
libicp_rescue \
|
||||||
_libzfs= libzfs
|
libnvpair \
|
||||||
_libzutil= libzutil
|
libtpool \
|
||||||
_libzfsbootenv= libzfsbootenv
|
libumem \
|
||||||
_libzpool= libzpool
|
libuutil \
|
||||||
_libtpool= libtpool
|
libzfs \
|
||||||
.if ${MK_OPENSSL} != "no"
|
libzfs_core \
|
||||||
_pam_zfs_key= pam_zfs_key
|
libzfsbootenv \
|
||||||
.endif
|
libzpool \
|
||||||
.endif
|
libzutil
|
||||||
|
|
||||||
|
SUBDIR.${MK_ZFS}.${MK_OPENSSL} = pam_zfs_key
|
||||||
|
|
||||||
SUBDIR_DEPEND_libavl= libspl
|
SUBDIR_DEPEND_libavl= libspl
|
||||||
SUBDIR_DEPEND_libctf= libspl
|
SUBDIR_DEPEND_libctf= libspl
|
||||||
|
|
|
@ -2,14 +2,11 @@
|
||||||
|
|
||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
|
|
||||||
SUBDIR= ${_zfs} ${_zpool}
|
|
||||||
|
|
||||||
SUBDIR.${MK_TESTS}+= tests
|
SUBDIR.${MK_TESTS}+= tests
|
||||||
|
|
||||||
.if ${MK_ZFS} != "no"
|
SUBDIR.${MK_ZFS}+= \
|
||||||
_zfs= zfs
|
zfs \
|
||||||
_zpool= zpool
|
zpool
|
||||||
.endif
|
|
||||||
|
|
||||||
SUBDIR_PARALLEL=
|
SUBDIR_PARALLEL=
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,7 @@
|
||||||
|
|
||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
|
|
||||||
SUBDIR= ${_zfs}
|
SUBDIR.${MK_ZFS}+= zfs
|
||||||
|
|
||||||
.if ${MK_ZFS} != "no"
|
|
||||||
_zfs= zfs
|
|
||||||
.endif
|
|
||||||
|
|
||||||
SUBDIR_PARALLEL=
|
SUBDIR_PARALLEL=
|
||||||
|
|
||||||
|
|
|
@ -2,21 +2,17 @@
|
||||||
|
|
||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
|
|
||||||
SUBDIR= \
|
SUBDIR.${MK_DTRACE}+= \
|
||||||
ctfconvert \
|
ctfconvert \
|
||||||
ctfdump \
|
ctfdump \
|
||||||
ctfmerge \
|
ctfmerge
|
||||||
${_zinject} \
|
|
||||||
${_zstream} \
|
|
||||||
${_ztest}
|
|
||||||
|
|
||||||
SUBDIR.${MK_TESTS}+= tests
|
SUBDIR.${MK_TESTS}+= tests
|
||||||
|
|
||||||
.if ${MK_ZFS} != "no"
|
SUBDIR.${MK_ZFS}+= \
|
||||||
_zinject= zinject
|
zinject \
|
||||||
_ztest= ztest
|
ztest \
|
||||||
_zstream = zstream
|
zstream
|
||||||
.endif
|
|
||||||
|
|
||||||
SUBDIR_PARALLEL=
|
SUBDIR_PARALLEL=
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,8 @@
|
||||||
|
|
||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
|
|
||||||
SUBDIR= ${_zpool_influxdb}
|
SUBDIR.${MK_ZFS}+= \
|
||||||
|
zpool_influxdb
|
||||||
.if ${MK_ZFS} != "no"
|
|
||||||
_zpool_influxdb= zpool_influxdb
|
|
||||||
.endif
|
|
||||||
|
|
||||||
SUBDIR_PARALLEL=
|
SUBDIR_PARALLEL=
|
||||||
|
|
||||||
|
|
|
@ -2,23 +2,19 @@
|
||||||
|
|
||||||
.include <src.opts.mk>
|
.include <src.opts.mk>
|
||||||
|
|
||||||
SUBDIR= ${_dtrace} \
|
SUBDIR.${MK_DTRACE}+= \
|
||||||
|
${_dtrace} \
|
||||||
${_dwatch} \
|
${_dwatch} \
|
||||||
${_lockstat} \
|
${_lockstat} \
|
||||||
${_plockstat} \
|
${_plockstat}
|
||||||
${_zdb} \
|
|
||||||
${_zfsd} \
|
|
||||||
${_zhack}
|
|
||||||
|
|
||||||
SUBDIR.${MK_TESTS}+= tests
|
SUBDIR.${MK_TESTS}+= tests
|
||||||
|
|
||||||
.if ${MK_ZFS} != "no"
|
SUBDIR.${MK_ZFS}+= \
|
||||||
_zdb= zdb
|
zdb \
|
||||||
_zhack= zhack
|
zhack
|
||||||
. if ${MK_CXX} != "no"
|
SUBDIR.${MK_ZFS}.${MK_CXX}+= \
|
||||||
_zfsd= zfsd
|
zfsd
|
||||||
. endif
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
|
||||||
_dtrace= dtrace
|
_dtrace= dtrace
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
|
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.Dd June 22, 2022
|
.Dd July 6, 2022
|
||||||
.Dt SRC.CONF 5
|
.Dt SRC.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -328,6 +328,8 @@ When set, it enforces these options:
|
||||||
.It
|
.It
|
||||||
.Va WITHOUT_CTF
|
.Va WITHOUT_CTF
|
||||||
.It
|
.It
|
||||||
|
.Va WITHOUT_DTRACE
|
||||||
|
.It
|
||||||
.Va WITHOUT_LOADER_ZFS
|
.Va WITHOUT_LOADER_ZFS
|
||||||
.It
|
.It
|
||||||
.Va WITHOUT_ZFS
|
.Va WITHOUT_ZFS
|
||||||
|
@ -612,6 +614,14 @@ Do not build dma Mail Transport Agent.
|
||||||
.It Va WITHOUT_DOCCOMPRESS
|
.It Va WITHOUT_DOCCOMPRESS
|
||||||
Do not install compressed system documentation.
|
Do not install compressed system documentation.
|
||||||
Only the uncompressed version will be installed.
|
Only the uncompressed version will be installed.
|
||||||
|
.It Va WITHOUT_DTRACE
|
||||||
|
Do not build DTrace framework kernel modules, libraries, and user commands.
|
||||||
|
When set, it enforces these options:
|
||||||
|
.Pp
|
||||||
|
.Bl -item -compact
|
||||||
|
.It
|
||||||
|
.Va WITHOUT_CTF
|
||||||
|
.El
|
||||||
.It Va WITH_DTRACE_TESTS
|
.It Va WITH_DTRACE_TESTS
|
||||||
Build and install the DTrace test suite in
|
Build and install the DTrace test suite in
|
||||||
.Pa /usr/tests/cddl/usr.sbin/dtrace .
|
.Pa /usr/tests/cddl/usr.sbin/dtrace .
|
||||||
|
|
|
@ -92,6 +92,7 @@ __DEFAULT_YES_OPTIONS = \
|
||||||
DIALOG \
|
DIALOG \
|
||||||
DICT \
|
DICT \
|
||||||
DMAGENT \
|
DMAGENT \
|
||||||
|
DTRACE \
|
||||||
DYNAMICROOT \
|
DYNAMICROOT \
|
||||||
EE \
|
EE \
|
||||||
EFI \
|
EFI \
|
||||||
|
@ -364,9 +365,10 @@ MK_SOURCELESS_UCODE:= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MK_CDDL} == "no"
|
.if ${MK_CDDL} == "no"
|
||||||
MK_ZFS:= no
|
|
||||||
MK_LOADER_ZFS:= no
|
|
||||||
MK_CTF:= no
|
MK_CTF:= no
|
||||||
|
MK_DTRACE:= no
|
||||||
|
MK_LOADER_ZFS:= no
|
||||||
|
MK_ZFS:= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MK_CRYPT} == "no"
|
.if ${MK_CRYPT} == "no"
|
||||||
|
@ -389,6 +391,10 @@ MK_TESTS:= no
|
||||||
MK_BSDINSTALL:= no
|
MK_BSDINSTALL:= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${MK_DTRACE} == "no"
|
||||||
|
MK_CTF:= no
|
||||||
|
.endif
|
||||||
|
|
||||||
.if ${MK_MAIL} == "no"
|
.if ${MK_MAIL} == "no"
|
||||||
MK_MAILWRAPPER:= no
|
MK_MAILWRAPPER:= no
|
||||||
MK_SENDMAIL:= no
|
MK_SENDMAIL:= no
|
||||||
|
|
|
@ -35,6 +35,7 @@ __DEFAULT_YES_OPTIONS = \
|
||||||
CDDL \
|
CDDL \
|
||||||
CRYPT \
|
CRYPT \
|
||||||
CUSE \
|
CUSE \
|
||||||
|
DTRACE \
|
||||||
EFI \
|
EFI \
|
||||||
FORMAT_EXTENSIONS \
|
FORMAT_EXTENSIONS \
|
||||||
INET \
|
INET \
|
||||||
|
@ -183,6 +184,10 @@ MK_${var}_SUPPORT:= yes
|
||||||
MK_KERNEL_SYMBOLS:= no
|
MK_KERNEL_SYMBOLS:= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${MK_CDDL} == "no"
|
||||||
|
MK_DTRACE:= no
|
||||||
|
.endif
|
||||||
|
|
||||||
# Some modules only compile successfully if option FDT is set, due to #ifdef FDT
|
# Some modules only compile successfully if option FDT is set, due to #ifdef FDT
|
||||||
# wrapped around declarations. Module makefiles can optionally compile such
|
# wrapped around declarations. Module makefiles can optionally compile such
|
||||||
# things using .if !empty(OPT_FDT)
|
# things using .if !empty(OPT_FDT)
|
||||||
|
|
|
@ -411,7 +411,7 @@ SUBDIR= \
|
||||||
_autofs= autofs
|
_autofs= autofs
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
|
.if ${MK_DTRACE} != "no" || defined(ALL_MODULES)
|
||||||
.if ${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != ""
|
.if ${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != ""
|
||||||
.if ${KERN_OPTS:MKDTRACE_HOOKS}
|
.if ${KERN_OPTS:MKDTRACE_HOOKS}
|
||||||
SUBDIR+= dtrace
|
SUBDIR+= dtrace
|
||||||
|
|
|
@ -902,13 +902,9 @@ OLD_FILES+=usr/share/man/man4/ccd.4.gz
|
||||||
OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz
|
OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MK_CDDL} == no
|
.if ${MK_DTRACE} == no
|
||||||
OLD_LIBS+=lib/libavl.so.2
|
|
||||||
OLD_LIBS+=lib/libctf.so.2
|
OLD_LIBS+=lib/libctf.so.2
|
||||||
OLD_LIBS+=lib/libdtrace.so.2
|
OLD_LIBS+=lib/libdtrace.so.2
|
||||||
OLD_LIBS+=lib/libnvpair.so.2
|
|
||||||
OLD_LIBS+=lib/libumem.so.2
|
|
||||||
OLD_LIBS+=lib/libuutil.so.2
|
|
||||||
OLD_FILES+=usr/bin/ctfconvert
|
OLD_FILES+=usr/bin/ctfconvert
|
||||||
OLD_FILES+=usr/bin/ctfdump
|
OLD_FILES+=usr/bin/ctfdump
|
||||||
OLD_FILES+=usr/bin/ctfmerge
|
OLD_FILES+=usr/bin/ctfmerge
|
||||||
|
@ -929,24 +925,12 @@ OLD_FILES+=usr/lib/dtrace/tcp.d
|
||||||
OLD_FILES+=usr/lib/dtrace/udp.d
|
OLD_FILES+=usr/lib/dtrace/udp.d
|
||||||
OLD_FILES+=usr/lib/dtrace/udplite.d
|
OLD_FILES+=usr/lib/dtrace/udplite.d
|
||||||
OLD_FILES+=usr/lib/dtrace/unistd.d
|
OLD_FILES+=usr/lib/dtrace/unistd.d
|
||||||
OLD_FILES+=usr/lib/libavl.a
|
|
||||||
OLD_FILES+=usr/lib/libavl.so
|
|
||||||
OLD_FILES+=usr/lib/libavl_p.a
|
|
||||||
OLD_FILES+=usr/lib/libctf.a
|
OLD_FILES+=usr/lib/libctf.a
|
||||||
OLD_FILES+=usr/lib/libctf.so
|
OLD_FILES+=usr/lib/libctf.so
|
||||||
OLD_FILES+=usr/lib/libctf_p.a
|
OLD_FILES+=usr/lib/libctf_p.a
|
||||||
OLD_FILES+=usr/lib/libdtrace.a
|
OLD_FILES+=usr/lib/libdtrace.a
|
||||||
OLD_FILES+=usr/lib/libdtrace.so
|
OLD_FILES+=usr/lib/libdtrace.so
|
||||||
OLD_FILES+=usr/lib/libdtrace_p.a
|
OLD_FILES+=usr/lib/libdtrace_p.a
|
||||||
OLD_FILES+=usr/lib/libnvpair.a
|
|
||||||
OLD_FILES+=usr/lib/libnvpair.so
|
|
||||||
OLD_FILES+=usr/lib/libnvpair_p.a
|
|
||||||
OLD_FILES+=usr/lib/libumem.a
|
|
||||||
OLD_FILES+=usr/lib/libumem.so
|
|
||||||
OLD_FILES+=usr/lib/libumem_p.a
|
|
||||||
OLD_FILES+=usr/lib/libuutil.a
|
|
||||||
OLD_FILES+=usr/lib/libuutil.so
|
|
||||||
OLD_FILES+=usr/lib/libuutil_p.a
|
|
||||||
OLD_LIBS+=lib/libdtrace.so.2
|
OLD_LIBS+=lib/libdtrace.so.2
|
||||||
OLD_FILES+=usr/libexec/dwatch/chmod
|
OLD_FILES+=usr/libexec/dwatch/chmod
|
||||||
OLD_FILES+=usr/libexec/dwatch/errno
|
OLD_FILES+=usr/libexec/dwatch/errno
|
||||||
|
@ -1080,6 +1064,10 @@ OLD_FILES+=etc/periodic/daily/404.status-zfs
|
||||||
OLD_FILES+=etc/periodic/daily/800.scrub-zfs
|
OLD_FILES+=etc/periodic/daily/800.scrub-zfs
|
||||||
OLD_FILES+=etc/zfs/exports
|
OLD_FILES+=etc/zfs/exports
|
||||||
OLD_DIRS+=etc/zfs
|
OLD_DIRS+=etc/zfs
|
||||||
|
OLD_LIBS+=lib/libavl.so.2
|
||||||
|
OLD_LIBS+=lib/libnvpair.so.2
|
||||||
|
OLD_LIBS+=lib/libumem.so.2
|
||||||
|
OLD_LIBS+=lib/libuutil.so.2
|
||||||
OLD_LIBS+=lib/libzfs.so.2
|
OLD_LIBS+=lib/libzfs.so.2
|
||||||
OLD_LIBS+=lib/libzfs.so.3
|
OLD_LIBS+=lib/libzfs.so.3
|
||||||
OLD_LIBS+=lib/libzfs_core.so.2
|
OLD_LIBS+=lib/libzfs_core.so.2
|
||||||
|
@ -1098,6 +1086,18 @@ OLD_FILES+=usr/lib/libbe.a
|
||||||
OLD_FILES+=usr/lib/libbe_p.a
|
OLD_FILES+=usr/lib/libbe_p.a
|
||||||
OLD_FILES+=usr/lib/libbe.so
|
OLD_FILES+=usr/lib/libbe.so
|
||||||
OLD_LIBS+=lib/libbe.so.1
|
OLD_LIBS+=lib/libbe.so.1
|
||||||
|
OLD_FILES+=usr/lib/libavl.a
|
||||||
|
OLD_FILES+=usr/lib/libavl.so
|
||||||
|
OLD_FILES+=usr/lib/libavl_p.a
|
||||||
|
OLD_FILES+=usr/lib/libnvpair.a
|
||||||
|
OLD_FILES+=usr/lib/libnvpair.so
|
||||||
|
OLD_FILES+=usr/lib/libnvpair_p.a
|
||||||
|
OLD_FILES+=usr/lib/libumem.a
|
||||||
|
OLD_FILES+=usr/lib/libumem.so
|
||||||
|
OLD_FILES+=usr/lib/libumem_p.a
|
||||||
|
OLD_FILES+=usr/lib/libuutil.a
|
||||||
|
OLD_FILES+=usr/lib/libuutil.so
|
||||||
|
OLD_FILES+=usr/lib/libuutil_p.a
|
||||||
OLD_FILES+=usr/lib/libzfs.a
|
OLD_FILES+=usr/lib/libzfs.a
|
||||||
OLD_FILES+=usr/lib/libzfs.so
|
OLD_FILES+=usr/lib/libzfs.so
|
||||||
OLD_FILES+=usr/lib/libzfs_core.a
|
OLD_FILES+=usr/lib/libzfs_core.a
|
||||||
|
|
2
tools/build/options/WITHOUT_DTRACE
Normal file
2
tools/build/options/WITHOUT_DTRACE
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
.\" $FreeBSD$
|
||||||
|
Do not build DTrace framework kernel modules, libraries, and user commands.
|
Loading…
Reference in a new issue