xref: /dragonfly/sys/platform/pc64/conf/kern.mk (revision e6d22e9b)
1# $FreeBSD: src/sys/conf/kern.mk,v 1.52 2007/05/24 21:53:42 obrien Exp $
2
3#
4# Warning flags for compiling the kernel and components of the kernel.
5#
6# For x86_64, we explicitly prohibit the use of FPU, SSE and other SIMD
7# operations inside the kernel itself.  These operations are exclusively
8# reserved for user applications.
9#
10# -fno-strict-aliasing required for -O2 compilation.
11#
12CFLAGS+=	-fno-stack-protector -fno-strict-aliasing
13CFLAGS+=	-fno-strict-overflow
14CFLAGS+=	-mcmodel=kernel -mno-red-zone -mfpmath=387
15
16CFLAGS+=	-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
17
18.if ${CCVER:Mgcc*}
19CFLAGS+=	-mpreferred-stack-boundary=4
20CFLAGS+=	-mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a \
21		-mno-sse5
22CFLAGS+=	-mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt
23
24.if ${CCVER:Mgcc4[789]} || ${CCVER:Mgcc5*}
25CFLAGS+=	-mno-avx2 -mno-fsgsbase -mno-rdrnd -mno-f16c
26CFLAGS+=	-mno-fma -mno-fma4
27CFLAGS+=	-mno-bmi -mno-bmi2
28CFLAGS+=	-mno-xop -mno-lwp -mno-lzcnt -mno-tbm
29.endif
30
31.if ${CCVER:Mgcc8*}
32CFLAGS+=	-mindirect-branch=thunk-inline
33.endif
34.endif
35
36CFLAGS+=	-msoft-float
37CFLAGS+=	-fno-asynchronous-unwind-tables -fno-omit-frame-pointer
38
39INLINE_LIMIT?=	8000
40