From owner-svn-src-head@freebsd.org Wed Apr 19 15:26:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B5EED4654F; Wed, 19 Apr 2017 15:26:14 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) Received: from ppsw-41.csi.cam.ac.uk (ppsw-41.csi.cam.ac.uk [131.111.8.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54AEDF49; Wed, 19 Apr 2017 15:26:13 +0000 (UTC) (envelope-from rb743@hermes.cam.ac.uk) X-Cam-AntiVirus: no malware found X-Cam-ScannerInfo: http://help.uis.cam.ac.uk/email-scanner-virus Received: from sc1.bsdpad.com ([163.172.212.18]:54423) by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.159]:587) with esmtpsa (LOGIN:rb743) (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1d0rUh-0000xb-QB (Exim 4.89) (return-path ); Wed, 19 Apr 2017 16:26:11 +0100 Date: Wed, 19 Apr 2017 15:22:57 +0000 From: Ruslan Bukin To: Baptiste Daroussin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316978 - in head: contrib/zstd etc/mtree lib lib/libzstd share/mk usr.bin usr.bin/zstd Message-ID: <20170419152257.GA59527@bsdpad.com> References: <201704152005.v3FK5M2j002459@repo.freebsd.org> <20170419142106.GA59031@bsdpad.com> <20170419145325.zjvo3hq2z3egcp26@ivaldir.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170419145325.zjvo3hq2z3egcp26@ivaldir.net> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: "R. Bukin" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Apr 2017 15:26:14 -0000 On Wed, Apr 19, 2017 at 04:53:25PM +0200, Baptiste Daroussin wrote: > 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) > I committed. Please upstream that. thanks Ruslan