Changeset View
Changeset View
Standalone View
Standalone View
sys/conf/kern.pre.mk
Show First 20 Lines • Show All 167 Lines • ▼ Show 20 Lines | |||||
NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ | NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \ | ||||
${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c | ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c | ||||
NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC} | NORMAL_FW= uudecode -o ${.TARGET} ${.ALLSRC} | ||||
NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ | NORMAL_FWO= ${LD} -b binary --no-warn-mismatch -d -warn-common -r \ | ||||
-m ${LD_EMULATION} -o ${.TARGET} ${.ALLSRC:M*.fw} | -m ${LD_EMULATION} -o ${.TARGET} ${.ALLSRC:M*.fw} | ||||
# for zlib in the kernel (include zstd/lib/freebsd before other CFLAGS) | |||||
delphij: It's worth mentioning that zstd/lib/freebsd was used to provide a mock version of standard C… | |||||
Done Inline ActionsI had to add few more files to drop -DNO_GZIP. I prefer this approach as I can see files in src while code generation in these references will be under obj and not easy to look for. I have few more items to visit, first. Let's come back to this later. ota_j.email.ne.jp: I had to add few more files to drop -DNO_GZIP. I prefer this approach as I can see files in… | |||||
ZLIB_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/../contrib/zlib -I$S/contrib/zstd/lib/freebsd ${CFLAGS} ${.IMPSRC} | |||||
Not Done Inline ActionsIn general, kernel includes should an explicit path. Source files which use zlib can include <contrib/zlib/zlib.h> explicitly. markj: In general, kernel includes should an explicit path. Source files which use zlib can include… | |||||
Not Done Inline ActionsThe two additional -D's are only specified for zutil.c for sys/modules/zlib (kmod.mk version of ZLIB_CFLAGS don't have these). Since the sys/conf/files already have them, should they be removed here? delphij: The two additional -D's are only specified for zutil.c for sys/modules/zlib (kmod.mk version of… | |||||
Done Inline ActionsThe extra flags will be changed for Z_SOLO. ota_j.email.ne.jp: The extra flags will be changed for Z_SOLO. | |||||
# for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS) | # for ZSTD in the kernel (include zstd/lib/freebsd before other CFLAGS) | ||||
ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} -Wno-inline -Wno-missing-prototypes ${PROF} -U__BMI__ ${.IMPSRC} | ZSTD_C= ${CC} -c -DZSTD_HEAPMODE=1 -I$S/contrib/zstd/lib/freebsd ${CFLAGS} -I$S/contrib/zstd/lib -I$S/contrib/zstd/lib/common ${WERROR} -Wno-inline -Wno-missing-prototypes ${PROF} -U__BMI__ ${.IMPSRC} | ||||
# 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 -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+= -include $S/cddl/compat/opensolaris/sys/debug_compat.h | CDDL_CFLAGS+= -include $S/cddl/compat/opensolaris/sys/debug_compat.h | ||||
CDDL_C= ${CC} -c ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | CDDL_C= ${CC} -c ${CDDL_CFLAGS} ${WERROR} ${PROF} ${.IMPSRC} | ||||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |
It's worth mentioning that zstd/lib/freebsd was used to provide a mock version of standard C headers.
Optional: I don't think this is the optimal approach, though: instead of making mock versions of these headers, we could adopt a similar approach of stand/libsa (rS326593 rS326710 et al).