From 2452e16e5baa1044e9dbe91e34617f8dd1326d0f Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Wed, 19 Apr 2017 15:24:33 +0000 Subject: [PATCH] Don't use __builtin_bswap for RISC-V due to undefined reference in compiler. This unbreaks RISC-V world build. Sponsored by: DARPA, AFRL --- contrib/zstd/lib/common/xxhash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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