Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.cpu.mk
Show First 20 Lines • Show All 300 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
########## arm | ########## arm | ||||
.if ${MACHINE_CPUARCH} == "arm" | .if ${MACHINE_CPUARCH} == "arm" | ||||
MACHINE_CPU += arm | MACHINE_CPU += arm | ||||
. if ${MACHINE_ARCH:Marmv6*} != "" | . if ${MACHINE_ARCH:Marmv6*} != "" | ||||
MACHINE_CPU += armv6 | MACHINE_CPU += armv6 | ||||
. endif | . endif | ||||
# armv6 is a hybrid. It uses the softfp ABI, but doesn't emulate | # armv6 is a hybrid. It can use the softfp ABI, but doesn't emulate | ||||
# floating point in the general case, so don't define softfp for | # floating point in the general case, so don't define softfp for | ||||
# it at this time. arm and armeb are pure softfp, so define it | # it at this time. arm and armeb are pure softfp, so define it | ||||
# for them. | # for them. | ||||
. if ${MACHINE_ARCH:Marmv6*} == "" | . if ${MACHINE_ARCH:Marmv6*} == "" | ||||
MACHINE_CPU += softfp | MACHINE_CPU += softfp | ||||
. endif | . endif | ||||
.if ${MACHINE_ARCH} == "armv6" | # Normally armv6 is hard float ABI from FreeBSD 11 onwards. However | ||||
# when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow | |||||
# building of soft-float ABI libraries. In this case, we have to | |||||
# add the -mfloat-abi=softfp to force that. | |||||
.if ${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" | |||||
# Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI | # Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI | ||||
# not a nice optimization. | # not a nice optimization. | ||||
CFLAGS += -mfloat-abi=softfp | CFLAGS += -mfloat-abi=softfp | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if ${MACHINE_CPUARCH} == "riscv" | .if ${MACHINE_CPUARCH} == "riscv" | ||||
CFLAGS += -msoft-float | CFLAGS += -msoft-float | ||||
Show All 33 Lines |