Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.cpu.mk
Show First 20 Lines • Show All 104 Lines • ▼ Show 20 Lines | |||||
_CPUCFLAGS = -march=${CPUTYPE} | _CPUCFLAGS = -march=${CPUTYPE} | ||||
. elif ${MACHINE_CPUARCH} == "arm" | . elif ${MACHINE_CPUARCH} == "arm" | ||||
. if ${CPUTYPE} == "xscale" | . if ${CPUTYPE} == "xscale" | ||||
#XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself | #XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself | ||||
#_CPUCFLAGS = -mcpu=xscale | #_CPUCFLAGS = -mcpu=xscale | ||||
_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" | |||||
_CPUCFLAGS = -march=${CPUTYPE} | |||||
. elif ${CPUTYPE} == "cortexa" | . elif ${CPUTYPE} == "cortexa" | ||||
_CPUCFLAGS = -march=armv7 -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 | ||||
# they require -march=. All the others require -mcpu=. | # they require -march=. All the others require -mcpu=. | ||||
_CPUCFLAGS = -march=${CPUTYPE} | _CPUCFLAGS = -march=${CPUTYPE} | ||||
. else | . else | ||||
▲ Show 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | |||||
. else | . else | ||||
CFLAGS += -msoft-float | CFLAGS += -msoft-float | ||||
. endif | . endif | ||||
.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:Marmv[67]*} != "" | ||||
mmel: This change is probably wrong, armv7 case is handled by next if | |||||
impAuthorUnsubmitted Not Done Inline ActionsGood point. Will update. imp: Good point. Will update. | |||||
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 | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if ${MACHINE_ARCH} == "powerpcspe" | .if ${MACHINE_ARCH} == "powerpcspe" | ||||
CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double | CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |
This change is probably wrong, armv7 case is handled by next if