git: 3ae78d66d9e5 - main - bsd.cpu.mk: Simplify armv[67] support
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Feb 2023 16:54:15 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3ae78d66d9e56fdda35bdf07b21c374ea5f2906b commit 3ae78d66d9e56fdda35bdf07b21c374ea5f2906b Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-02-14 16:49:26 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-02-14 16:53:15 +0000 bsd.cpu.mk: Simplify armv[67] support Drop a clause that's no longer relevant to v4/v5. Drop support for softfloat for v[45]. Simplify soft float expression by assuming we're always either armv6 or armv7. Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38584 --- share/mk/bsd.cpu.mk | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index db5fa08df4bc..693a9b5209da 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -103,9 +103,9 @@ _CPUCFLAGS = -march=armv5te -D__XSCALE__ _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 @@ MACHINE_CPU += armv6 . 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.