]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.stand.mk
MFC Loader Fixes 2017q2: r316437,r316577,r316578,r316585,r316590,r316612,
[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} != "aarch64"
10 CFLAGS+=        -msoft-float
11 .endif
12
13 .if ${MACHINE_CPUARCH} == "i386"
14 CFLAGS.gcc+=    -mpreferred-stack-boundary=2
15 .endif
16 .if ${MACHINE_CPUARCH} == "amd64"
17 CFLAGS+=        -fPIC -mno-red-zone
18 .endif
19 .if ${MACHINE} == "pc98"
20 CFLAGS+=        -Os
21 .endif
22 .if ${MACHINE_CPUARCH} == "aarch64"
23 CFLAGS+=        -fPIC -mgeneral-regs-only
24 .endif
25 .if ${MACHINE_CPUARCH} == "mips"
26 CFLAGS+=        -G0 -fno-pic -mno-abicalls
27 .endif