Changeset View
Changeset View
Standalone View
Standalone View
head/share/mk/bsd.stand.mk
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# Common definitons for programs building in the stand-alone environment | # Common definitons for programs building in the stand-alone environment | ||||
# and/or using libstand. | # and/or using libstand. | ||||
# | # | ||||
CFLAGS+= -ffreestanding -Wformat | CFLAGS+= -ffreestanding -Wformat | ||||
CFLAGS+= ${CFLAGS_NO_SIMD} -D_STANDALONE | CFLAGS+= ${CFLAGS_NO_SIMD} -D_STANDALONE | ||||
.if ${MACHINE_CPUARCH} == "riscv" | .if ${MACHINE_CPUARCH} == "riscv" | ||||
CFLAGS+= -mno-float | CFLAGS+= -mno-float | ||||
.else | .elif ${MACHINE_CPUARCH} != "aarch64" | ||||
CFLAGS+= -msoft-float | CFLAGS+= -msoft-float | ||||
.endif | .endif | ||||
.if ${MACHINE_CPUARCH} == "i386" | .if ${MACHINE_CPUARCH} == "i386" | ||||
CFLAGS.gcc+= -mpreferred-stack-boundary=2 | CFLAGS.gcc+= -mpreferred-stack-boundary=2 | ||||
.endif | .endif | ||||
.if ${MACHINE_CPUARCH} == "amd64" | .if ${MACHINE_CPUARCH} == "amd64" | ||||
CFLAGS+= -fPIC -mno-red-zone | CFLAGS+= -fPIC -mno-red-zone | ||||
.endif | .endif | ||||
.if ${MACHINE_CPUARCH} == "aarch64" | .if ${MACHINE_CPUARCH} == "aarch64" | ||||
CFLAGS+= -fPIC -mgeneral-regs-only | CFLAGS+= -fPIC -mgeneral-regs-only | ||||
.endif | .endif | ||||
.if ${MACHINE_CPUARCH} == "mips" | .if ${MACHINE_CPUARCH} == "mips" | ||||
CFLAGS+= -G0 -fno-pic -mno-abicalls | CFLAGS+= -G0 -fno-pic -mno-abicalls | ||||
.endif | .endif |