diff options
author | avg <avg@FreeBSD.org> | 2013-08-06 15:51:56 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2013-08-06 15:51:56 +0000 |
commit | a07c9d34c39b8316691600e021968b318b087434 (patch) | |
tree | 43da06fcd1bc6c1b678d5db8fc0a0a2cfcf19f6e /sys/conf | |
parent | cd60e1fa27e6b6272254aba34a77694d9954788c (diff) | |
download | FreeBSD-src-a07c9d34c39b8316691600e021968b318b087434.zip FreeBSD-src-a07c9d34c39b8316691600e021968b318b087434.tar.gz |
opensolaris code: translate INVARIANTS to DEBUG and ZFS_DEBUG
Do this by forcing inclusion of
sys/cddl/compat/opensolaris/sys/debug_compat.h
via -include option into all source files from OpenSolaris.
Note that this -include option must always be after -include opt_global.h.
Additionally, remove forced definition of DEBUG for some modules and fix
their build without DEBUG.
Also, meaning of DEBUG was overloaded to enable WITNESS support for some
OpenSolaris (primarily ZFS) locks. Now this overloading is removed and
that use of DEBUG is replaced with a new option OPENSOLARIS_WITNESS.
MFC after: 17 days
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/kern.pre.mk | 1 | ||||
-rw-r--r-- | sys/conf/options | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 516dbc4..b01d506 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -139,6 +139,7 @@ NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ # Special flags for managing the compat compiles for ZFS ZFS_CFLAGS= -DFREEBSD_NAMECACHE -DBUILDING_ZFS -nostdinc -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common/fs/zfs -I$S/cddl/contrib/opensolaris/uts/common/zmod -I$S/cddl/contrib/opensolaris/uts/common -I$S -I$S/cddl/contrib/opensolaris/common/zfs -I$S/cddl/contrib/opensolaris/common ${CFLAGS} -Wno-unknown-pragmas -Wno-missing-prototypes -Wno-undef -Wno-strict-prototypes -Wno-cast-qual -Wno-parentheses -Wno-redundant-decls -Wno-missing-braces -Wno-uninitialized -Wno-unused -Wno-inline -Wno-switch -Wno-pointer-arith -Wno-unknown-pragmas +ZFS_CFLAGS+= -include $S/cddl/compat/opensolaris/sys/debug_compat.h ZFS_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${ZFS_CFLAGS} ZFS_C= ${CC} -c ${ZFS_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} ZFS_S= ${CC} -c ${ZFS_ASM_CFLAGS} ${WERROR} ${.IMPSRC} diff --git a/sys/conf/options b/sys/conf/options index c32b4578..ed37a8e 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -681,6 +681,7 @@ WITNESS opt_global.h WITNESS_KDB opt_witness.h WITNESS_NO_VNODE opt_witness.h WITNESS_SKIPSPIN opt_witness.h +OPENSOLARIS_WITNESS opt_global.h # options for ACPI support ACPI_DEBUG opt_acpi.h |