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/modules | |
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/modules')
-rw-r--r-- | sys/modules/cyclic/Makefile | 5 | ||||
-rw-r--r-- | sys/modules/dtrace/dtio/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/dtmalloc/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/dtnfscl/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/dtnfsclient/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/dtrace/Makefile | 5 | ||||
-rw-r--r-- | sys/modules/dtrace/dtrace_test/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/dtraceall/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/fasttrap/Makefile | 5 | ||||
-rw-r--r-- | sys/modules/dtrace/fbt/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/lockstat/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/profile/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/prototype/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/sdt/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/systrace/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/systrace_freebsd32/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/dtrace/systrace_linux32/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/opensolaris/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/zfs/Makefile | 2 |
19 files changed, 43 insertions, 4 deletions
diff --git a/sys/modules/cyclic/Makefile b/sys/modules/cyclic/Makefile index e0e3b40..054f3c3 100644 --- a/sys/modules/cyclic/Makefile +++ b/sys/modules/cyclic/Makefile @@ -11,9 +11,10 @@ CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris \ -I${.CURDIR}/../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../.. \ -I${.CURDIR}/../../cddl/dev/cyclic/i386 - -CFLAGS+= -DDEBUG=1 +CFLAGS+= -include ${.CURDIR}/../../cddl/compat/opensolaris/sys/debug_compat.h IGNORE_PRAGMA= 1 .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/dtio/Makefile b/sys/modules/dtrace/dtio/Makefile index ff68ce4..2b777ef 100644 --- a/sys/modules/dtrace/dtio/Makefile +++ b/sys/modules/dtrace/dtio/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/dtmalloc/Makefile b/sys/modules/dtrace/dtmalloc/Makefile index efb2607..3034b46 100644 --- a/sys/modules/dtrace/dtmalloc/Makefile +++ b/sys/modules/dtrace/dtmalloc/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/dtnfscl/Makefile b/sys/modules/dtrace/dtnfscl/Makefile index 0296232..6c40e62 100644 --- a/sys/modules/dtrace/dtnfscl/Makefile +++ b/sys/modules/dtrace/dtnfscl/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/dtnfsclient/Makefile b/sys/modules/dtrace/dtnfsclient/Makefile index 5e26bba..b19cc3f 100644 --- a/sys/modules/dtrace/dtnfsclient/Makefile +++ b/sys/modules/dtrace/dtnfsclient/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/dtrace/Makefile b/sys/modules/dtrace/dtrace/Makefile index e6aaba7..3299a1e 100644 --- a/sys/modules/dtrace/dtrace/Makefile +++ b/sys/modules/dtrace/dtrace/Makefile @@ -40,7 +40,7 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common \ -I${.CURDIR}/../../.. -DDIS_MEM -CFLAGS+= -DSMP -DDEBUG +CFLAGS+= -DSMP EXPORT_SYMS= dtrace_register \ dtrace_unregister \ @@ -50,6 +50,9 @@ dtrace_asm.o: assym.s .include <bsd.kmod.mk> +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h + CWARNFLAGS+= -Wno-parentheses CWARNFLAGS+= -Wno-uninitialized CWARNFLAGS+= -Wno-cast-qual +CWARNFLAGS+= -Wno-unused diff --git a/sys/modules/dtrace/dtrace_test/Makefile b/sys/modules/dtrace/dtrace_test/Makefile index b03fe17..c5bb169d4 100644 --- a/sys/modules/dtrace/dtrace_test/Makefile +++ b/sys/modules/dtrace/dtrace_test/Makefile @@ -13,3 +13,5 @@ CFLAGS+= -I${.CURDIR}/../../.. CFLAGS+= -D_KERNEL .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/dtraceall/Makefile b/sys/modules/dtrace/dtraceall/Makefile index 6def76e..d57e41e 100644 --- a/sys/modules/dtrace/dtraceall/Makefile +++ b/sys/modules/dtrace/dtraceall/Makefile @@ -13,3 +13,5 @@ opt_compat.h: .endif .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/fasttrap/Makefile b/sys/modules/dtrace/fasttrap/Makefile index cf93c15..6008498 100644 --- a/sys/modules/dtrace/fasttrap/Makefile +++ b/sys/modules/dtrace/fasttrap/Makefile @@ -15,6 +15,9 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/uts/intel/dtrace .endif -CFLAGS+= -DSMP -DDEBUG +CFLAGS+= -DSMP .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h +CWARNFLAGS+= -Wno-unused diff --git a/sys/modules/dtrace/fbt/Makefile b/sys/modules/dtrace/fbt/Makefile index 8b00148..7c03d31 100644 --- a/sys/modules/dtrace/fbt/Makefile +++ b/sys/modules/dtrace/fbt/Makefile @@ -15,3 +15,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/lockstat/Makefile b/sys/modules/dtrace/lockstat/Makefile index d00a0ec..c87a65a 100644 --- a/sys/modules/dtrace/lockstat/Makefile +++ b/sys/modules/dtrace/lockstat/Makefile @@ -12,3 +12,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/profile/Makefile b/sys/modules/dtrace/profile/Makefile index 22cd10d..daa5d2c 100644 --- a/sys/modules/dtrace/profile/Makefile +++ b/sys/modules/dtrace/profile/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/prototype/Makefile b/sys/modules/dtrace/prototype/Makefile index 49cc0a8..cad750a 100644 --- a/sys/modules/dtrace/prototype/Makefile +++ b/sys/modules/dtrace/prototype/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/sdt/Makefile b/sys/modules/dtrace/sdt/Makefile index d531d78..96605e1 100644 --- a/sys/modules/dtrace/sdt/Makefile +++ b/sys/modules/dtrace/sdt/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/systrace/Makefile b/sys/modules/dtrace/systrace/Makefile index d85a365..f495d55 100644 --- a/sys/modules/dtrace/systrace/Makefile +++ b/sys/modules/dtrace/systrace/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/systrace_freebsd32/Makefile b/sys/modules/dtrace/systrace_freebsd32/Makefile index 284d99f..ec72d0b 100644 --- a/sys/modules/dtrace/systrace_freebsd32/Makefile +++ b/sys/modules/dtrace/systrace_freebsd32/Makefile @@ -11,3 +11,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. -DFREEBSD32_SYSTRACE .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/dtrace/systrace_linux32/Makefile b/sys/modules/dtrace/systrace_linux32/Makefile index c950aac..a2bfc81 100644 --- a/sys/modules/dtrace/systrace_linux32/Makefile +++ b/sys/modules/dtrace/systrace_linux32/Makefile @@ -16,3 +16,5 @@ CFLAGS+= -I${.CURDIR}/../../../cddl/compat/opensolaris \ -I${.CURDIR}/../../.. -DLINUX_SYSTRACE .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/opensolaris/Makefile b/sys/modules/opensolaris/Makefile index 54dcfe6..a49462a 100644 --- a/sys/modules/opensolaris/Makefile +++ b/sys/modules/opensolaris/Makefile @@ -27,3 +27,5 @@ CFLAGS+= -I${.CURDIR}/../../cddl/compat/opensolaris \ IGNORE_PRAGMA= 1 .include <bsd.kmod.mk> + +CFLAGS+= -include ${.CURDIR}/../../cddl/compat/opensolaris/sys/debug_compat.h diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index b0ef51c..63da0ce2 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -96,6 +96,8 @@ CFLAGS+=-mminimal-toc .include <bsd.kmod.mk> +CFLAGS+= -include ${.CURDIR}/../../cddl/compat/opensolaris/sys/debug_compat.h + CWARNFLAGS+=-Wno-unknown-pragmas CWARNFLAGS+=-Wno-missing-prototypes CWARNFLAGS+=-Wno-undef |