Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2017 15:24:34 +0000 (UTC)
From:      Ruslan Bukin <br@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317144 - head/contrib/zstd/lib/common
Message-ID:  <201704191524.v3JFOYiK061287@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704191524.v3JFOYiK061287>