svn commit: r316978 - in head: contrib/zstd etc/mtree lib lib/libzstd share/mk usr.bin usr.bin/zstd
Ruslan Bukin
ruslan.bukin at cl.cam.ac.uk
Wed Apr 19 14:24:23 UTC 2017
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
On Sat, Apr 15, 2017 at 08:05:22PM +0000, Baptiste Daroussin wrote:
> Author: bapt
> Date: Sat Apr 15 20:05:22 2017
> New Revision: 316978
> URL: https://svnweb.freebsd.org/changeset/base/316978
>
> Log:
> Import zstandard 1.1.4 in base
>
> zstandard is a new compression library/tool which is very fast at
> compression/decompression
>
> For now import as a private library
>
> Added:
> head/contrib/zstd/
> - copied from r316976, vendor/zstd/dist/
> head/lib/libzstd/
> head/lib/libzstd/Makefile (contents, props changed)
> head/usr.bin/zstd/
> head/usr.bin/zstd/Makefile (contents, props changed)
> Modified:
> head/etc/mtree/BSD.usr.dist
> head/lib/Makefile
> head/share/mk/src.libnames.mk
> head/usr.bin/Makefile
>
> Modified: head/etc/mtree/BSD.usr.dist
> ==============================================================================
> --- head/etc/mtree/BSD.usr.dist Sat Apr 15 20:03:50 2017 (r316977)
> +++ head/etc/mtree/BSD.usr.dist Sat Apr 15 20:05:22 2017 (r316978)
> @@ -17,6 +17,8 @@
> ..
> ucl
> ..
> + zstd
> + ..
> ..
> ..
> lib
>
> Modified: head/lib/Makefile
> ==============================================================================
> --- head/lib/Makefile Sat Apr 15 20:03:50 2017 (r316977)
> +++ head/lib/Makefile Sat Apr 15 20:05:22 2017 (r316978)
> @@ -90,6 +90,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \
> libxo \
> liby \
> libz \
> + libzstd \
> ncurses
>
> # Inter-library dependencies. When the makefile for a library contains LDADD
>
> Added: head/lib/libzstd/Makefile
> ==============================================================================
> --- /dev/null 00:00:00 1970 (empty, because file is newly added)
> +++ head/lib/libzstd/Makefile Sat Apr 15 20:05:22 2017 (r316978)
> @@ -0,0 +1,34 @@
> +# $FreeBSD$
> +
> +LIB= zstd
> +SRCS= entropy_common.c \
> + error_private.c \
> + fse_decompress.c \
> + pool.c \
> + threading.c \
> + xxhash.c \
> + zstd_common.c \
> + fse_compress.c \
> + huf_compress.c \
> + zstd_compress.c \
> + zstdmt_compress.c \
> + huf_decompress.c \
> + zstd_decompress.c \
> + zbuff_common.c \
> + zbuff_compress.c \
> + zbuff_decompress.c \
> + cover.c \
> + divsufsort.c \
> + zdict.c
> +WARNS= 2
> +INCS= zstd.h
> +CFLAGS+= -I${ZSTDDIR}/lib -I${ZSTDDIR}/lib/common -DXXH_NAMESPACE=ZSTD_
> +
> +PRIVATELIB= yes
> +
> +ZSTDDIR= ${SRCTOP}/contrib/zstd
> +.PATH: ${ZSTDDIR}/lib/common ${ZSTDDIR}/lib/compress \
> + ${ZSTDDIR}/lib/decompress ${ZSTDDIR}/lib/deprecated \
> + ${ZSTDDIR}/lib/dictBuilder ${ZSTDDIR}/lib
> +
> +.include <bsd.lib.mk>
>
> Modified: head/share/mk/src.libnames.mk
> ==============================================================================
> --- head/share/mk/src.libnames.mk Sat Apr 15 20:03:50 2017 (r316977)
> +++ head/share/mk/src.libnames.mk Sat Apr 15 20:05:22 2017 (r316978)
> @@ -24,7 +24,8 @@ _PRIVATELIBS= \
> sqlite3 \
> ssh \
> ucl \
> - unbound
> + unbound \
> + zstd
>
> _INTERNALLIBS= \
> amu \
>
> Modified: head/usr.bin/Makefile
> ==============================================================================
> --- head/usr.bin/Makefile Sat Apr 15 20:03:50 2017 (r316977)
> +++ head/usr.bin/Makefile Sat Apr 15 20:05:22 2017 (r316978)
> @@ -189,7 +189,8 @@ SUBDIR= alias \
> xo \
> xz \
> xzdec \
> - yes
> + yes \
> + zstd
>
> # NB: keep these sorted by MK_* knobs
>
>
> Added: head/usr.bin/zstd/Makefile
> ==============================================================================
> --- /dev/null 00:00:00 1970 (empty, because file is newly added)
> +++ head/usr.bin/zstd/Makefile Sat Apr 15 20:05:22 2017 (r316978)
> @@ -0,0 +1,21 @@
> +# $FreeBSD$
> +
> +PROG= zstd
> +SRCS= bench.c \
> + datagen.c \
> + dibio.c \
> + fileio.c \
> + zstdcli.c
> +
> +CFLAGS+= -I${SRCTOP}/contrib/zstd/programs \
> + -I${SRCTOP}/contrib/zstd/lib/common \
> + -I${SRCTOP}/contrib/zstd/lib/compress \
> + -I${SRCTOP}/contrib/zstd/lib/dictBuilder \
> + -I${SRCTOP}/contrib/zstd/lib \
> + -DXXH_NAMESPACE=ZSTD_
> +
> +WARNS= 2
> +LIBADD= zstd
> +.PATH: ${SRCTOP}/contrib/zstd/programs
> +
> +.include <bsd.prog.mk>
>
More information about the svn-src-all
mailing list