xref: /dragonfly/sys/platform/vkernel64/conf/kern.mk (revision 02ac8a8f)
1#
2# Prohibit the use of FP registers in the kernel.  The user FP state is
3# only saved and restored under strictly managed conditions and mainline
4# kernel code cannot safely use the FP system.
5#
6.if ${CCVER:Mgcc*}
7CFLAGS+=	-mpreferred-stack-boundary=4
8
9# Retpoline spectre protection
10#
11.if ${CCVER:Mgcc8*}
12CFLAGS+=	-mindirect-branch=thunk-inline
13.endif
14
15.endif
16
17CFLAGS+=	-fno-stack-protector -fno-strict-aliasing
18CFLAGS+=	-fno-strict-overflow
19CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
20CFLAGS+=	-D_KERNEL_VIRTUAL
21CFLAGS+=	-fno-omit-frame-pointer
22
23# Remove the dynamic library hack for now
24#
25SYSTEM_OBJS:= ${SYSTEM_OBJS:Nhack.So}
26
27INLINE_LIMIT=	8000
28