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
This commit is contained in:
Warner Losh 2023-02-14 09:48:51 -07:00
parent 5c33688475
commit ae902a5be9
7 changed files with 8 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 \

View File

@ -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=''

View File

@ -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)

View File

@ -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