git: ae902a5be9b8 - main - libc: Simplify soft-float on 32-bit arm
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Feb 2023 16:54:13 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ae902a5be9b814332269a70350f4e27cb4eb1d94 commit ae902a5be9b814332269a70350f4e27cb4eb1d94 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-02-14 16:48:51 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-02-14 16:53:08 +0000 libc: Simplify soft-float on 32-bit arm Simplify the tests for 32-bit arm soft float support. For the files included only on arm, drop the test entirely. For others, test MACHINE_CPUARCH against arm. No functional change intended. File lists appear the same before / after the change. Sponsored by: Netflix Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D38582 --- lib/libc/Makefile | 3 +-- lib/libc/arm/Makefile.inc | 2 +- lib/libc/arm/aeabi/Makefile.inc | 5 ++--- lib/libc/arm/gen/Makefile.inc | 2 +- lib/libc/sys/Makefile.inc | 2 +- lib/libcompiler_rt/Makefile.inc | 2 +- lib/msun/arm/Makefile.inc | 2 +- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index c9150869f223..2ca5458d1437 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -124,8 +124,7 @@ NOASM= .include "${LIBC_SRCTOP}/rpc/Makefile.inc" .include "${LIBC_SRCTOP}/uuid/Makefile.inc" .include "${LIBC_SRCTOP}/xdr/Makefile.inc" -.if (${LIBC_ARCH} == "arm" && \ - (${MACHINE_ARCH:Marmv[67]*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ +.if (${LIBC_ARCH} == "arm" && (defined(CPUTYPE) && ${CPUTYPE:M*soft*})) || \ (${LIBC_ARCH} == "riscv" && ${MACHINE_ARCH:Mriscv*sf} != "") .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif diff --git a/lib/libc/arm/Makefile.inc b/lib/libc/arm/Makefile.inc index c4b3458ba2cd..c844c32778b8 100644 --- a/lib/libc/arm/Makefile.inc +++ b/lib/libc/arm/Makefile.inc @@ -11,7 +11,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol.map .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if !defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "" SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map .endif diff --git a/lib/libc/arm/aeabi/Makefile.inc b/lib/libc/arm/aeabi/Makefile.inc index 9ccabc2186f9..dfb640564bdf 100644 --- a/lib/libc/arm/aeabi/Makefile.inc +++ b/lib/libc/arm/aeabi/Makefile.inc @@ -5,14 +5,13 @@ SRCS+= aeabi_atexit.c \ aeabi_unwind_cpp.c \ aeabi_unwind_exidx.c -.if (${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "") || \ - ${MACHINE_ARCH:Marmv[67]*} == "" +.if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" SRCS+= aeabi_asm_double.S \ aeabi_asm_float.S \ aeabi_double.c \ aeabi_float.c .endif -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if !defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "" SRCS+= aeabi_vfp_double.S \ aeabi_vfp_float.S .endif diff --git a/lib/libc/arm/gen/Makefile.inc b/lib/libc/arm/gen/Makefile.inc index 77c995f70cbc..4a35a0eb7efd 100644 --- a/lib/libc/arm/gen/Makefile.inc +++ b/lib/libc/arm/gen/Makefile.inc @@ -23,7 +23,7 @@ MAN+= \ arm_drain_writebuf.2 \ arm_sync_icache.2 \ -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if !defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "" SRCS+= \ fpgetmask_vfp.c \ diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index a86d7d160b6c..45287813fe13 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -128,7 +128,7 @@ SYM_MAPS+= ${LIBC_SRCTOP}/sys/Symbol.map CLEANFILES+= ${SASM} ${SPSEUDO} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ - ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv[67]*} + ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n' .else NOTE_GNU_STACK='' diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 45eb72165cd8..a1cc3d4cac07 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -226,7 +226,7 @@ SRCF+= stdatomic .endif .for file in ${SRCF} -.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ +.if ${MACHINE_CPUARCH} == "arm" && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) SRCS+= ${file}vfp.S . elif exists(${CRTSRC}/${CRTARCH}/${file}.S) diff --git a/lib/msun/arm/Makefile.inc b/lib/msun/arm/Makefile.inc index 6ebf21a9c3c5..05f3548f946a 100644 --- a/lib/msun/arm/Makefile.inc +++ b/lib/msun/arm/Makefile.inc @@ -3,7 +3,7 @@ LDBL_PREC = 53 SYM_MAPS += ${.CURDIR}/arm/Symbol.map -.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" +.if defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" ARCH_SRCS = fenv-softfp.c fenv-vfp.c .endif