Index: head/lib/libc/tests/gen/Makefile =================================================================== --- head/lib/libc/tests/gen/Makefile +++ head/lib/libc/tests/gen/Makefile @@ -35,11 +35,12 @@ CFLAGS+= -DTEST_LONG_DOUBLE -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "i386" + ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif Index: head/lib/libc/tests/stdlib/Makefile =================================================================== --- head/lib/libc/tests/stdlib/Makefile +++ head/lib/libc/tests/stdlib/Makefile @@ -19,11 +19,12 @@ # All architectures on FreeBSD have fenv.h CFLAGS+= -D__HAVE_FENV -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "i386" + ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif Index: head/lib/msun/tests/Makefile =================================================================== --- head/lib/msun/tests/Makefile +++ head/lib/msun/tests/Makefile @@ -10,11 +10,12 @@ # For isqemu.h CFLAGS+= -I${TESTSRC:H}/libc/gen -# Not sure why this isn't defined for all architectures, since most -# have long double. +# Define __HAVE_LONG_DOUBLE for architectures whose long double has greater +# precision than their double. .if ${MACHINE_CPUARCH} == "aarch64" || \ ${MACHINE_CPUARCH} == "amd64" || \ - ${MACHINE_CPUARCH} == "i386" + ${MACHINE_CPUARCH} == "i386" || \ + ${MACHINE_CPUARCH} == "riscv" CFLAGS+= -D__HAVE_LONG_DOUBLE .endif