ef31e101b14aa97d9025705c830fd9fb8d488c5b
[dragonfly.git] / sys / platform / pc64 / conf / kern.mk
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 #
12 CFLAGS+=        -fno-stack-protector -fno-strict-aliasing
13 CFLAGS+=        -fno-strict-overflow
14 CFLAGS+=        -mcmodel=kernel -mno-red-zone -mfpmath=387
15
16 CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3
17
18 .if ${CCVER:Mgcc*}
19 CFLAGS+=        -mpreferred-stack-boundary=4
20 CFLAGS+=        -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a \
21                 -mno-sse5 
22 CFLAGS+=        -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt
23
24 .if ${CCVER:Mgcc4[789]} || ${CCVER:Mgcc5*}
25 CFLAGS+=        -mno-avx2 -mno-fsgsbase -mno-rdrnd -mno-f16c
26 CFLAGS+=        -mno-fma -mno-fma4
27 CFLAGS+=        -mno-bmi -mno-bmi2
28 CFLAGS+=        -mno-xop -mno-lwp -mno-lzcnt -mno-tbm
29 .endif
30 .endif
31
32 CFLAGS+=        -msoft-float
33 CFLAGS+=        -fno-asynchronous-unwind-tables -fno-omit-frame-pointer
34
35 INLINE_LIMIT?=  8000