Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.cpu.mk
Context not available. | |||||
_CPUCFLAGS = -march=armv5te -D__XSCALE__ | _CPUCFLAGS = -march=armv5te -D__XSCALE__ | ||||
. elif ${CPUTYPE:M*soft*} != "" | . elif ${CPUTYPE:M*soft*} != "" | ||||
_CPUCFLAGS = -mfloat-abi=softfp | _CPUCFLAGS = -mfloat-abi=softfp | ||||
. elif ${CPUTYPE} == "armv6" | |||||
# Not sure we still need ARM_ARCH_6=1 here. | |||||
_CPUCFLAGS = -march=${CPUTYPE} -DARM_ARCH_6=1 | |||||
. elif ${CPUTYPE} == "cortexa" | . elif ${CPUTYPE} == "cortexa" | ||||
_CPUCFLAGS = -march=armv7 -DARM_ARCH_6=1 -mfpu=vfp | _CPUCFLAGS = -march=armv7 -mfpu=vfp | ||||
. elif ${CPUTYPE:Marmv[4567]*} != "" | . elif ${CPUTYPE:Marmv[4567]*} != "" | ||||
# Handle all the armvX types that FreeBSD runs: | # Handle all the armvX types that FreeBSD runs: | ||||
# armv4, armv4t, armv5, armv5te, armv6, armv6t2, armv7, armv7-a, armv7ve | # armv4, armv4t, armv5, armv5te, armv6, armv6t2, armv7, armv7-a, armv7ve | ||||
Context not available. | |||||
. if ${MACHINE_ARCH:Marmv6*} != "" | . if ${MACHINE_ARCH:Marmv6*} != "" | ||||
MACHINE_CPU += armv6 | MACHINE_CPU += armv6 | ||||
. endif | . endif | ||||
# armv6 is a hybrid. It can use the softfp ABI, but doesn't emulate | . if ${MACHINE_ARCH:Marmv7*} != "" | ||||
# floating point in the general case, so don't define softfp for | MACHINE_CPU += armv7 | ||||
# it at this time. arm and armeb are pure softfp, so define it | . endif | ||||
# for them. | # armv6 and armv7 are a hybrid. It can use the softfp ABI, but doesn't emulate | ||||
. if ${MACHINE_ARCH:Marmv6*} == "" | # 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 for them. | |||||
. if ${MACHINE_ARCH:Marmv[67]*} == "" | |||||
MACHINE_CPU += softfp | MACHINE_CPU += softfp | ||||
. endif | . endif | ||||
# Normally armv6 is hard float ABI from FreeBSD 11 onwards. However | # Normally armv6 and armv7 are hard float ABI from FreeBSD 11 onwards. However | ||||
# when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow | # when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow building of | ||||
# building of soft-float ABI libraries. In this case, we have to | # soft-float ABI libraries. In this case, we have to add the -mfloat-abi=softfp | ||||
# add the -mfloat-abi=softfp to force that. | # to force that. | ||||
.if ${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" | .if ${MACHINE_ARCH:Marmv[67]*} && 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 | ||||
Context not available. |