diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -103,9 +103,9 @@ _CPUCFLAGS = -mfloat-abi=softfp . elif ${CPUTYPE} == "cortexa" _CPUCFLAGS = -march=armv7 -mfpu=vfp -. elif ${CPUTYPE:Marmv[4567]*} != "" +. elif ${CPUTYPE:Marmv[67]*} != "" # Handle all the armvX types that FreeBSD runs: -# armv4, armv4t, armv5, armv5te, armv6, armv6t2, armv7, armv7-a, armv7ve +# armv6, armv6t2, armv7, armv7-a, armv7ve # they require -march=. All the others require -mcpu=. _CPUCFLAGS = -march=${CPUTYPE} . else @@ -292,17 +292,11 @@ . if ${MACHINE_ARCH:Marmv7*} != "" MACHINE_CPU += armv7 . endif -# armv6 and armv7 are a hybrid. It can use the softfp ABI, but doesn't emulate -# floating point in the general case, so don't define softfp for it at this -# time. arm is pure softfp, so define it for them. -. if ${MACHINE_ARCH:Marmv[67]*} == "" -MACHINE_CPU += softfp -. endif # 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 building of # soft-float ABI libraries. In this case, we have to add the -mfloat-abi=softfp # to force that. -. if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" +. if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" # Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI # not a nice optimization. Please note: softfp ABI uses hardware floating # instructions, but passes arguments to function calls in integer regsiters.