From owner-svn-src-all@freebsd.org Sun Mar 18 03:42:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A8B5F5B500; Sun, 18 Mar 2018 03:42:58 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3309D7C598; Sun, 18 Mar 2018 03:42:58 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2DE731B64A; Sun, 18 Mar 2018 03:42:58 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2I3gwc9075658; Sun, 18 Mar 2018 03:42:58 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2I3gvlQ075656; Sun, 18 Mar 2018 03:42:57 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803180342.w2I3gvlQ075656@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sun, 18 Mar 2018 03:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331115 - in head: lib/libzstd sys/contrib/zstd/lib/freebsd X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head: lib/libzstd sys/contrib/zstd/lib/freebsd X-SVN-Commit-Revision: 331115 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2018 03:42:58 -0000 Author: cem Date: Sun Mar 18 03:42:57 2018 New Revision: 331115 URL: https://svnweb.freebsd.org/changeset/base/331115 Log: 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 Modified: head/lib/libzstd/Makefile head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c Modified: head/lib/libzstd/Makefile ============================================================================== --- head/lib/libzstd/Makefile Sun Mar 18 02:59:14 2018 (r331114) +++ head/lib/libzstd/Makefile Sun Mar 18 03:42:57 2018 (r331115) @@ -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 Modified: head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c ============================================================================== --- head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c Sun Mar 18 02:59:14 2018 (r331114) +++ head/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c Sun Mar 18 03:42:57 2018 (r331115) @@ -27,7 +27,12 @@ */ #include "zstd_kfreebsd.h" +#include #include + +#ifndef _KERNEL +#include +#endif /* * The kernel as a standalone target does not link against libgcc or