Author: br
Date: Wed Apr 19 15:24:33 2017
New Revision: 317144
URL: https://svnweb.freebsd.org/changeset/base/317144

Log:
  Don't use __builtin_bswap for RISC-V due to undefined reference
  in compiler.
  
  This unbreaks RISC-V world build.
  
  Sponsored by: DARPA, AFRL

Modified:
  head/contrib/zstd/lib/common/xxhash.c

Modified: head/contrib/zstd/lib/common/xxhash.c
==============================================================================
--- head/contrib/zstd/lib/common/xxhash.c       Wed Apr 19 15:04:52 2017        
(r317143)
+++ head/contrib/zstd/lib/common/xxhash.c       Wed Apr 19 15:24:33 2017        
(r317144)
@@ -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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to