mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 20:37:06 +00:00
lib(private)zstd: Fix riscv build
Link __bswap[ds]i2() intrinsics in to libzstd for riscv, where the C runtime apparently lacks such intrinsics. Broken in r330894. Reported by: asomers Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
7dc5b4402b
commit
22aec4de9f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=331115
|
@ -43,4 +43,11 @@ ZSTDDIR= ${SRCTOP}/sys/contrib/zstd
|
|||
CFLAGS.zstd_compress.c+= -O0
|
||||
.endif
|
||||
|
||||
# Work around lack of __bswap[sd]i2() intrinsics on riscv. Probably should be
|
||||
# added to one of the runtime C libraries instead.
|
||||
.if ${MACHINE_CPUARCH} == "riscv"
|
||||
.PATH: ${ZSTDDIR}/lib/freebsd
|
||||
SRCS+= zstd_kfreebsd.c
|
||||
.endif
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
|
|
@ -27,8 +27,13 @@
|
|||
*/
|
||||
|
||||
#include "zstd_kfreebsd.h"
|
||||
#include <sys/param.h>
|
||||
#include <sys/endian.h>
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The kernel as a standalone target does not link against libgcc or
|
||||
* libcompiler-rt. On platforms (e.g., MIPS and RISCV) that do not have a
|
||||
|
|
Loading…
Reference in a new issue