Changeset View
Standalone View
sys/conf/kern.pre.mk
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | |||||
# "Note that [GCC] autovectorization still does not do a good job on the | # "Note that [GCC] autovectorization still does not do a good job on the | ||||
# optimized version, so it's turned off via attribute and flag. I found | # optimized version, so it's turned off via attribute and flag. I found | ||||
# that neither attribute nor command-line flag were entirely successful in | # that neither attribute nor command-line flag were entirely successful in | ||||
# turning off vectorization, which is why there were both." | # turning off vectorization, which is why there were both." | ||||
.if ${COMPILER_TYPE} == "gcc" | .if ${COMPILER_TYPE} == "gcc" | ||||
ZSTD_DECOMPRESS_BLOCK_FLAGS= -fno-tree-vectorize | ZSTD_DECOMPRESS_BLOCK_FLAGS= -fno-tree-vectorize | ||||
.endif | .endif | ||||
ZINCDIR=$S/contrib/openzfs/include | |||||
# Common for dtrace / zfs | # Common for dtrace / zfs | ||||
CDDL_CFLAGS= -DFREEBSD_NAMECACHE -nostdinc -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common -I$S -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 | CDDL_CFLAGS= -DFREEBSD_NAMECACHE -D_SYS_VMEM_H_ -D__KERNEL -D__KERNEL__ -D_MACHINE_ENDIAN_H_ \ | ||||
CDDL_CFLAGS+= -include $S/cddl/compat/opensolaris/sys/debug_compat.h | -DKERNEL_STATIC -nostdinc -include opt_global.h -include $S/modules/zfs/static_ccompile.h \ | ||||
-I${ZINCDIR} -I${ZINCDIR}/spl -I${ZINCDIR}/os/freebsd -I${ZINCDIR}/os/freebsd/spl \ | |||||
-I${ZINCDIR}/os/freebsd/zfs -I$S -I$S/modules/zfs ${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 -Wno-duplicate-decl-specifier \ | |||||
-include ${ZINCDIR}/os/freebsd/spl/sys/ccompile.h -I$S/cddl/contrib/opensolaris/uts/common \ | |||||
-I$S -I$S/cddl/compat/opensolaris | |||||
sjg: I'm a big fan of formatting long lists one-per-line - just as you have done in some of the… | |||||
Not Done Inline ActionsFWIW I literally meant one per line as in -DFREEBSD_NAMECACHE \ -D_SYS_VMEM_H_ \ -D__KERNEL \ -D__KERNEL__ ` etc (with single TAB) indent, this obviously adds a lot of lines, but IMO aids readability and maintainability Others might disagree - not sure. sjg: FWIW I literally meant one per line as in
`
CDDL_FLAGS= \
-DFREEBSD_NAMECACHE \… | |||||
Not Done Inline ActionsI'll second this freqlabs: I'll second this | |||||
Done Inline Actions
That's going to seriously bloat the file. I'll have to get a quorum on that first because I'd be completely surprised if someone didn't come along and violently insist I revert it. This being FreeBSD and all. mmacy: > FWIW I literally meant one per line as in
> `
> CDDL_FLAGS= \
> -DFREEBSD_NAMECACHE \
>… | |||||
Not Done Inline ActionsI think there's enough of a consensus you should do this. It's my sense from years of doing it that 70-80% of the people like it, and maybe 10% don't. That's as a consensus (which I've informally been using 2/3 or better, btw, as the yardstick). imp: I think there's enough of a consensus you should do this. It's my sense from years of doing it… | |||||
Done Inline Actions
\o/ mmacy: > I think there's enough of a consensus you should do this. It's my sense from years of doing… | |||||
CDDL_C= ${CC} -c ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | CDDL_C= ${CC} -c ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | ||||
# Special flags for managing the compat compiles for ZFS | # Special flags for managing the compat compiles for ZFS | ||||
ZFS_CFLAGS= -DBUILDING_ZFS -I$S/cddl/contrib/opensolaris/uts/common/fs/zfs | ZFS_CFLAGS+= ${CDDL_CFLAGS} -DBUILDING_ZFS -DHAVE_UIO_ZEROCOPY -DWITH_NETDUMP | ||||
ZFS_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/common/fs/zfs/lua | ZFS_CFLAGS+= -D__KERNEL__ -D_SYS_CONDVAR_H_ -DSMP | ||||
ZFS_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/common/zmod | |||||
ZFS_CFLAGS+= -I$S/cddl/contrib/opensolaris/common/lz4 | .if ${MACHINE_ARCH} == "amd64" | ||||
ZFS_CFLAGS+= -I$S/cddl/contrib/opensolaris/common/zfs | ZFS_CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_SSE2 -DHAVE_AVX512F | ||||
ZFS_CFLAGS+= ${CDDL_CFLAGS} | .endif | ||||
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ | |||||
${MACHINE_ARCH} == "arm" | |||||
ZFS_CFLAGS+= -DBITS_PER_LONG=32 | |||||
.else | |||||
ZFS_CFLAGS+= -DBITS_PER_LONG=64 | |||||
.endif | |||||
ZFS_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${ZFS_CFLAGS} | ZFS_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${ZFS_CFLAGS} | ||||
ZFS_C= ${CC} -c ${ZFS_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | ZFS_C= ${CC} -c ${ZFS_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | ||||
ZFS_S= ${CC} -c ${ZFS_ASM_CFLAGS} ${WERROR} ${.IMPSRC} | ZFS_S= ${CC} -c ${ZFS_ASM_CFLAGS} ${WERROR} ${.IMPSRC} | ||||
# Special flags for managing the compat compiles for DTrace | # Special flags for managing the compat compiles for DTrace | ||||
DTRACE_CFLAGS= -DBUILDING_DTRACE ${CDDL_CFLAGS} -I$S/cddl/dev/dtrace -I$S/cddl/dev/dtrace/${MACHINE_CPUARCH} | DTRACE_CFLAGS= -DBUILDING_DTRACE ${CDDL_CFLAGS} -I$S/cddl/dev/dtrace -I$S/cddl/dev/dtrace/${MACHINE_CPUARCH} | ||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" | .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" | ||||
DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/intel -I$S/cddl/dev/dtrace/x86 | DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/intel -I$S/cddl/dev/dtrace/x86 | ||||
.endif | .endif | ||||
DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/common/util -I$S -DDIS_MEM -DSMP | DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/common/util -I$S -DDIS_MEM -DSMP -I$S/cddl/compat/opensolaris | ||||
DTRACE_CFLAGS+= -I$S/cddl/contrib/opensolaris/uts/common | |||||
DTRACE_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${DTRACE_CFLAGS} | DTRACE_ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${DTRACE_CFLAGS} | ||||
DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | DTRACE_C= ${CC} -c ${DTRACE_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | ||||
DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${WERROR} ${.IMPSRC} | DTRACE_S= ${CC} -c ${DTRACE_ASM_CFLAGS} ${WERROR} ${.IMPSRC} | ||||
# Special flags for managing the compat compiles for DTrace/FBT | # Special flags for managing the compat compiles for DTrace/FBT | ||||
FBT_CFLAGS= -DBUILDING_DTRACE -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} | FBT_CFLAGS= -DBUILDING_DTRACE -nostdinc -I$S/cddl/dev/fbt/${MACHINE_CPUARCH} -I$S/cddl/dev/fbt ${CDDL_CFLAGS} -I$S/cddl/compat/opensolaris -I$S/cddl/contrib/opensolaris/uts/common | ||||
.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" | .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" | ||||
FBT_CFLAGS+= -I$S/cddl/dev/fbt/x86 | FBT_CFLAGS+= -I$S/cddl/dev/fbt/x86 | ||||
.endif | .endif | ||||
FBT_C= ${CC} -c ${FBT_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | FBT_C= ${CC} -c ${FBT_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | ||||
.if ${MK_CTF} != "no" | .if ${MK_CTF} != "no" | ||||
NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} | NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} | ||||
.elif ${MAKE_VERSION} >= 5201111300 | .elif ${MAKE_VERSION} >= 5201111300 | ||||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |
I'm a big fan of formatting long lists one-per-line - just as you have done in some of the other makefiles - blobs like this are very hard to read let alone review chanages to