3b5c550eba26e37af890e959dcff646710f9781f
[dragonfly.git] / sys / boot / pc32 / Makefile.inc
1 # Common defines for all of /sys/boot/i386/
2
3 .if !target(__pc32__)
4 __pc32__:
5
6 LOADER_ADDRESS?= 0x200000
7 WORLD_CCOPTLEVEL=       1 # Force -O1, -O2 implodes
8 CFLAGS+=        -ffreestanding -fno-omit-frame-pointer
9 CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
10
11 # override CPU type, so that gcc doesn't insert mmx/sse instructions
12 FORCE_CPUTYPE=  i386
13
14 WARNS?= 2
15
16 # if a gcc compiler is being used, identify GCC-only flags,
17 # otherwise check for clang and set value of ASSEMBLER_FLAGS if found
18 .if ${CCVER:Mgcc*}
19 CFLAGS+=                -mpreferred-stack-boundary=2
20 BOOT2_GCC_FLAGS=        -fno-guess-branch-probability \
21                         -fno-unit-at-a-time
22 .elif ${CCVER:Mclang*}
23 ASSEMBLER_FLAGS+=       -no-integrated-as
24 .endif
25
26 .if defined(REALLY_X86_64)
27 .include "../pc64/Makefile.inc"
28 .endif
29 .endif