git: dadecd7293e2 - stable/15 - stand: Add compiler builtins needed by GCC for RISC-V

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 24 Apr 2026 15:29:23 UTC
The branch stable/15 has been updated by jhb:

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

commit dadecd7293e210ec04c9065da3a460fb37a015e2
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-01-31 17:10:36 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-04-24 15:26:39 +0000

    stand: Add compiler builtins needed by GCC for RISC-V
    
    Reviewed by:    mhorne
    Differential Revision:  https://reviews.freebsd.org/D54963
    
    (cherry picked from commit fe45651224bea513c7db88abbc53bd1241ab442f)
---
 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