boot - Force -O
[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 # Force -O, -O2 implodes
8 #
9 CFLAGS+=        -O
10 CFLAGS+=        -ffreestanding
11 CFLAGS+=        -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
12
13 # override CPU type, so that gcc doesn't insert mmx/sse instructions
14 FORCE_CPUTYPE=  i386
15
16 WARNS?= 2
17
18 # if a gcc compiler is being used, identify GCC-only flags,
19 # otherwise check for clang and set value of ASSEMBLER_FLAGS if found
20 .if ${CCVER:Mgcc*}
21 CFLAGS+=                -mpreferred-stack-boundary=2
22 BOOT2_GCC_FLAGS=        -fno-guess-branch-probability \
23                         -fno-unit-at-a-time
24 .elif ${CCVER:Mclang*}
25 ASSEMBLER_FLAGS+=       -no-integrated-as
26 .endif
27
28 .if defined(REALLY_X86_64)
29 .include "../pc64/Makefile.inc"
30 .endif
31 .endif