]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.stand.mk
Merge bmake-20170510
[FreeBSD/FreeBSD.git] / share / mk / bsd.stand.mk
1 # $FreeBSD$
2 #
3 # Common definitons for programs building in the stand-alone environment
4 # and/or using libstand.
5 #
6
7 CFLAGS+= -ffreestanding -Wformat
8 CFLAGS+= ${CFLAGS_NO_SIMD} -D_STANDALONE
9 .if ${MACHINE_CPUARCH} == "riscv"
10 CFLAGS+=        -mno-float
11 .elif ${MACHINE_CPUARCH} != "aarch64"
12 CFLAGS+=        -msoft-float
13 .endif
14
15 .if ${MACHINE_CPUARCH} == "i386"
16 CFLAGS.gcc+=    -mpreferred-stack-boundary=2
17 .endif
18 .if ${MACHINE_CPUARCH} == "amd64"
19 CFLAGS+=        -fPIC -mno-red-zone
20 .endif
21 .if ${MACHINE_CPUARCH} == "aarch64"
22 CFLAGS+=        -fPIC -mgeneral-regs-only
23 .endif
24 .if ${MACHINE_CPUARCH} == "mips"
25 CFLAGS+=        -G0 -fno-pic -mno-abicalls
26 .endif