git: fe45651224be - main - stand: Add compiler builtins needed by GCC for RISC-V

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Sat, 31 Jan 2026 17:21:29 UTC
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=fe45651224bea513c7db88abbc53bd1241ab442f

commit fe45651224bea513c7db88abbc53bd1241ab442f
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-01-31 17:10:36 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-01-31 17:10:36 +0000

    stand: Add compiler builtins needed by GCC for RISC-V
    
    Reviewed by:    mhorne
    Differential Revision:  https://reviews.freebsd.org/D54963
---
 stand/libsa/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/stand/libsa/Makefile b/stand/libsa/Makefile
index 470c03032f61..11896cf1a2ab 100644
--- a/stand/libsa/Makefile
+++ b/stand/libsa/Makefile
@@ -66,6 +66,9 @@ SRCS+=	clzsi2.c ctzsi2.c
 SRCS+=	divmoddi4.c  divmodsi4.c  divdi3.c  divsi3.c  moddi3.c  modsi3.c
 SRCS+=	udivmoddi4.c udivmodsi4.c udivdi3.c udivsi3.c umoddi3.c umodsi3.c
 SRCS+=	ashldi3.c ashrdi3.c lshrdi3.c
+.if ${MACHINE_CPUARCH} == "riscv"
+SRCS+=	bswapdi2.c bswapsi2.c clzdi2.c ctzdi2.c
+.endif
 
 .if ${MACHINE_CPUARCH:Namd64:Ni386} == ""
 .PATH: ${SASRC}/x86