Index: sys/cddl/dev/dtrace/arm/dtrace_asm.S =================================================================== --- sys/cddl/dev/dtrace/arm/dtrace_asm.S +++ sys/cddl/dev/dtrace/arm/dtrace_asm.S @@ -28,7 +28,10 @@ #define _ASM #define _LOCORE + +#ifndef LOCORE #define LOCORE +#endif #include #include Index: sys/conf/files =================================================================== --- sys/conf/files +++ sys/conf/files @@ -104,11 +104,12 @@ cam/scsi/scsi_target.c optional targ cam/scsi/smp_all.c optional scbus # shared between zfs and dtrace -cddl/compat/opensolaris/kern/opensolaris.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris.c optional zfs | dtrace compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs | dtrace compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs | dtrace compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs | dtrace compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs | dtrace compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs | dtrace compile-with "${ZFS_C}" # zfs specific cddl/compat/opensolaris/kern/opensolaris_acl.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_dtrace.c optional zfs compile-with "${ZFS_C}" @@ -118,7 +119,6 @@ cddl/compat/opensolaris/kern/opensolaris_policy.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_string.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_sysevent.c optional zfs compile-with "${ZFS_C}" -cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_uio.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vfs.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vm.c optional zfs compile-with "${ZFS_C}" @@ -242,6 +242,17 @@ cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod_subr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zutil.c optional zfs compile-with "${ZFS_C}" +# dtrace specific +cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ + warning "kernel contains CDDL licensed DTRACE" +cddl/dev/dtmalloc/dtmalloc.c optional dtrace compile-with "${DTRACE_CMN_C}" +cddl/dev/lockstat/lockstat.c optional dtrace compile-with "${DTRACE_CMN_C}" +cddl/dev/profile/profile.c optional dtrace compile-with "${DTRACE_CMN_C}" +cddl/dev/sdt/sdt.c optional dtrace compile-with "${DTRACE_CMN_C}" +cddl/dev/fbt/fbt.c optional dtrace compile-with "${FBT_C}" +cddl/dev/systrace/systrace.c optional dtrace compile-with "${DTRACE_CMN_C}" +cddl/dev/prototype.c optional dtrace compile-with "${DTRACE_CMN_C}" +fs/nfsclient/nfs_clkdtrace.c optional dtrace compile-with "${DTRACE_CMN_C}" compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 Index: sys/conf/files.arm =================================================================== --- sys/conf/files.arm +++ sys/conf/files.arm @@ -65,7 +65,10 @@ compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \ no-obj no-implicit-rule before-depend \ clean "board_id.h" -cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs compile-with "${ZFS_C}" +cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs | dtrace compile-with "${ZFS_C}" +cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}" +cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}" +cddl/dev/fbt/arm/fbt_isa.c optional dtrace compile-with "${FBT_C}" crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/fb/fb.c optional sc Index: sys/conf/kern.post.mk =================================================================== --- sys/conf/kern.post.mk +++ sys/conf/kern.post.mk @@ -184,11 +184,11 @@ ${SYSTEM_OBJS} genassym.o vers.o: opt_global.h -# We have "special" -I include paths for opensolaris/zfs files in 'depend'. -CFILES_NOZFS= ${CFILES:N*/opensolaris/*} -SFILES_NOZFS= ${SFILES:N*/opensolaris/*} -CFILES_ZFS= ${CFILES:M*/opensolaris/*} -SFILES_ZFS= ${SFILES:M*/opensolaris/*} +# We have "special" -I include paths for zfs/dtrace files in 'depend'. +CFILES_NOCDDL= ${CFILES:N*/cddl/*:N*fs/nfsclient/nfs_clkdtrace*} +SFILES_NOCDDL= ${SFILES:N*/cddl/*} +CFILES_CDDL= ${CFILES:M*/cddl/*} +SFILES_CDDL= ${SFILES:M*/cddl/*} kernel-depend: .depend # The argument list can be very long, so use make -V and xargs to @@ -198,13 +198,13 @@ ${MFILES:T:S/.m$/.h/} .depend: .PRECIOUS ${SRCS} rm -f .newdep - ${MAKE} -V CFILES_NOZFS -V SYSTEM_CFILES -V GEN_CFILES | \ + ${MAKE} -V CFILES_NOCDDL -V SYSTEM_CFILES -V GEN_CFILES | \ MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${CFLAGS} - ${MAKE} -V CFILES_ZFS | \ - MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${ZFS_CFLAGS} - ${MAKE} -V SFILES_NOZFS | \ + ${MAKE} -V CFILES_CDDL | \ + MKDEP_CPP="${CC} -E" CC="${CC}" xargs mkdep -a -f .newdep ${ZFS_CFLAGS} ${FBT_CFLAGS} ${DTRACE_CFLAGS} + ${MAKE} -V SFILES_NOCDDL | \ MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ASM_CFLAGS} - ${MAKE} -V SFILES_ZFS | \ + ${MAKE} -V SFILES_CDDL | \ MKDEP_CPP="${CC} -E" xargs mkdep -a -f .newdep ${ZFS_ASM_CFLAGS} rm -f .depend mv .newdep .depend Index: sys/conf/kern.pre.mk =================================================================== --- sys/conf/kern.pre.mk +++ sys/conf/kern.pre.mk @@ -142,13 +142,25 @@ NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ -o ${.TARGET} ${.ALLSRC:M*.fw} +CDDL_CFLAGS= ${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 + # 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= -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 ${CDDL_CFLAGS} 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} +DTRACE_CMN_CFLAGS= -nostdinc -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common -I$S ${CDDL_CFLAGS} +DTRACE_CFLAGS= -nostdinc -I$S/cddl/compat/opensolaris -I$S/cddl/dev/dtrace -I$S/cddl/dev/dtrace/${MACHINE_CPUARCH} -I$S/cddl/contrib/opensolaris/uts/common -I$S/cddl/contrib/opensolaris/common/util -I$S -DDIS_MEM -DSMP ${CDDL_CFLAGS} +FBT_CFLAGS= -nostdinc -I$S/cddl/dev/fbt/${MACHINE_CPUARCH} -I$S/cddl/dev/fbt -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common -I$S ${CDDL_CFLAGS} +DTRACE_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${DTRACE_CFLAGS} + +DTRACE_CMN_C= ${CC} -c ${DTRACE_CMN_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} +DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} +DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${.IMPSRC} +FBT_C= ${CC} -c ${FBT_CFLAGS} ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} + .if ${MK_CTF} != "no" NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} .elif ${MAKE_VERSION} >= 5201111300