svn commit: r316978 - in head: contrib/zstd etc/mtree lib lib/libzstd share/mk usr.bin usr.bin/zstd

Baptiste Daroussin bapt at FreeBSD.org
Wed Apr 19 14:53:26 UTC 2017


On Wed, Apr 19, 2017 at 02:21:06PM +0000, Ruslan Bukin wrote:
> This break RISC-V world build:
> /home/br/obj//riscv.riscv64/usr/home/br/dev/freebsd-head/tmp/usr/lib/libprivatezstd.so: undefined reference to `__bswap
> si2'
> /home/br/obj//riscv.riscv64/usr/home/br/dev/freebsd-head/tmp/usr/lib/libprivatezstd.so: undefined reference to `__bswap
> di2'
> 
> Here is patch that makes it compilable:
> 
> diff --git a/contrib/zstd/lib/common/xxhash.c b/contrib/zstd/lib/common/xxhash.c
> index eb44222c5fc..d59a22a0638 100644
> --- a/contrib/zstd/lib/common/xxhash.c
> +++ b/contrib/zstd/lib/common/xxhash.c
> @@ -206,7 +206,7 @@ static U64 XXH_read64(const void* memPtr)
>  #if defined(_MSC_VER)     /* Visual Studio */
>  #  define XXH_swap32 _byteswap_ulong
>  #  define XXH_swap64 _byteswap_uint64
> -#elif GCC_VERSION >= 403
> +#elif (GCC_VERSION >= 403 && !defined(__riscv__))
>  #  define XXH_swap32 __builtin_bswap32
>  #  define XXH_swap64 __builtin_bswap64
>  #else
> 
> Ruslan

Thank you, can you please commit it? Have you upstreamed it, do you want me to
do it? (I have already signed the facebook agreement)

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20170419/9ec77676/attachment.sig>


More information about the svn-src-head mailing list