From ea0a30b14507592144d7f2218d75de0cf52a2b07 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 14 Aug 2019 18:41:28 +0000 Subject: [PATCH] compiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V As with other archs the compiler may emit calls to the byte swap routines under certain conditions. MFC after: 1 week Sponsored by: The FreeBSD Foundation --- lib/libcompiler_rt/Makefile.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libcompiler_rt/Makefile.inc b/lib/libcompiler_rt/Makefile.inc index 71b83c52ceca..b606abb41f4a 100644 --- a/lib/libcompiler_rt/Makefile.inc +++ b/lib/libcompiler_rt/Makefile.inc @@ -234,7 +234,8 @@ SRCS+= sync_synchronize.S .endif # On some archs GCC-6.3 requires bswap32 built-in. -.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "sparc64" +.if ${MACHINE_CPUARCH} == "mips" || ${MACHINE_CPUARCH} == "riscv" || \ + ${MACHINE_CPUARCH} == "sparc64" SRCS+= bswapdi2.c SRCS+= bswapsi2.c .endif