2015-08-27 23:46:42 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Common definitons for programs building in the stand-alone environment
|
|
|
|
# and/or using libstand.
|
|
|
|
#
|
|
|
|
|
|
|
|
CFLAGS+= -ffreestanding -Wformat
|
2016-11-03 13:06:17 +00:00
|
|
|
CFLAGS+= ${CFLAGS_NO_SIMD} -D_STANDALONE
|
|
|
|
.if ${MACHINE_CPUARCH} == "riscv"
|
2017-08-10 14:18:09 +00:00
|
|
|
CFLAGS+= -march=rv64imac -mabi=lp64
|
2017-04-07 22:58:25 +00:00
|
|
|
.elif ${MACHINE_CPUARCH} != "aarch64"
|
2016-11-03 13:06:17 +00:00
|
|
|
CFLAGS+= -msoft-float
|
|
|
|
.endif
|
2015-08-27 23:46:42 +00:00
|
|
|
|
|
|
|
.if ${MACHINE_CPUARCH} == "i386"
|
|
|
|
CFLAGS.gcc+= -mpreferred-stack-boundary=2
|
|
|
|
.endif
|
|
|
|
.if ${MACHINE_CPUARCH} == "amd64"
|
|
|
|
CFLAGS+= -fPIC -mno-red-zone
|
|
|
|
.endif
|
|
|
|
.if ${MACHINE_CPUARCH} == "aarch64"
|
2017-04-07 14:30:51 +00:00
|
|
|
CFLAGS+= -fPIC -mgeneral-regs-only
|
2015-08-27 23:46:42 +00:00
|
|
|
.endif
|
2017-07-25 10:41:34 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "arm"
|
|
|
|
CFLAGS+= -fPIC
|
|
|
|
.endif
|
2015-08-27 23:46:42 +00:00
|
|
|
.if ${MACHINE_CPUARCH} == "mips"
|
|
|
|
CFLAGS+= -G0 -fno-pic -mno-abicalls
|
|
|
|
.endif
|