Back port from FreeBSD 13.1. required for GCC 12

Fixes ld error message: "relocation R_RISCV_JAL against `setjmp' which may bind
externally can not be used when making a shared object" which means that there
can not be a direct jump ("j", "jal", etc.) to a function is a jump slot (in
PLT). So do not use the "j" calls.

--- src/lib/libc/lib/libc/riscv/gen/sigsetjmp.S
+++ src/lib/libc/lib/libc/riscv/gen/sigsetjmp.S
@@ -38,20 +38,24 @@ __FBSDID("$FreeBSD: releng/12.0/lib/libc/riscv/gen/sigsetjmp.S 294227 2016-01-17
 #include <machine/setjmp.h>
 
 ENTRY(sigsetjmp)
-	beqz	a1, _C_LABEL(_setjmp)
-	j	_C_LABEL(setjmp)
+	beqz	a1, 1f
+tail	_C_LABEL(setjmp)
+	1:
+	tail	_C_LABEL(_setjmp)
 END(sigsetjmp)
 
 ENTRY(siglongjmp)
 	/* Load the _setjmp magic */
 	ld	a2, .Lmagic
-	ld	a3, 0(a0)
+ld	a3, 0(a0)
 
 	/* Check the magic */
-	beq	a2, a3, _C_LABEL(_longjmp)
-	j	_C_LABEL(longjmp)
+	beq	a2, a3, 1f
+tail	_C_LABEL(longjmp)
+	1:
+tail	_C_LABEL(_longjmp)
 
 	.align	3
-.Lmagic:
+	.Lmagic:
 	.quad	_JB_MAGIC__SETJMP
 END(siglongjmp)
