2017-01-30 10:04:16 +00:00
|
|
|
# Variables set during configure phase:
|
|
|
|
# * build environment, paths
|
|
|
|
# * features (eg. convert, documentation)
|
|
|
|
export
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
LN_S = @LN_S@
|
|
|
|
AR = @AR@
|
|
|
|
RM = @RM@
|
|
|
|
RMDIR = @RMDIR@
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
DISABLE_DOCUMENTATION = @DISABLE_DOCUMENTATION@
|
|
|
|
DISABLE_BTRFSCONVERT = @DISABLE_BTRFSCONVERT@
|
2018-07-26 20:34:38 +00:00
|
|
|
BUILD_PROGRAMS = @BUILD_PROGRAMS@
|
2018-07-26 20:34:39 +00:00
|
|
|
BUILD_SHARED_LIBRARIES = @BUILD_SHARED_LIBRARIES@
|
|
|
|
BUILD_STATIC_LIBRARIES = @BUILD_STATIC_LIBRARIES@
|
2017-01-30 10:04:16 +00:00
|
|
|
BTRFSCONVERT_EXT2 = @BTRFSCONVERT_EXT2@
|
2017-08-22 16:30:43 +00:00
|
|
|
BTRFSCONVERT_REISERFS = @BTRFSCONVERT_REISERFS@
|
2022-06-20 23:53:05 +00:00
|
|
|
COMPRESSION_LZO = @COMPRESSION_LZO@
|
|
|
|
COMPRESSION_ZSTD = @COMPRESSION_ZSTD@
|
2017-12-18 08:31:25 +00:00
|
|
|
PYTHON_BINDINGS = @PYTHON_BINDINGS@
|
|
|
|
PYTHON = @PYTHON@
|
2018-02-27 15:19:51 +00:00
|
|
|
PYTHON_CFLAGS = @PYTHON_CFLAGS@
|
2020-04-06 19:02:56 +00:00
|
|
|
CRYPTOPROVIDER_BUILTIN = @CRYPTOPROVIDER_BUILTIN@
|
2023-11-16 13:54:03 +00:00
|
|
|
CRYPTO_CFLAGS = @GCRYPT_CFLAGS@ @SODIUM_CFLAGS@ @KCAPI_CFLAGS@ @BOTAN_CFLAGS@ @OPENSSL_CFLAGS@
|
2017-01-30 10:04:16 +00:00
|
|
|
|
2023-03-01 00:32:26 +00:00
|
|
|
HAVE_CFLAG_msse2 = @HAVE_CFLAG_msse2@
|
|
|
|
HAVE_CFLAG_msse41 = @HAVE_CFLAG_msse41@
|
|
|
|
HAVE_CFLAG_mavx2 = @HAVE_CFLAG_mavx2@
|
2023-02-09 13:58:08 +00:00
|
|
|
HAVE_CFLAG_msha = @HAVE_CFLAG_msha@
|
btrfs-progs: crypto: add PCL based implementation for crc32c
Copy faster implementation of crc32c from linux kernel as of 6.5-rc7
(x86_64, arch/x86/crypto/crc32c-pcl-intel-asm_64.S). This needs
assembler build support, so detect target architecture so
cross-compilation still works.
Add a special CPU flag so the old and new implementations can be
benchmarked and verified separately.
Sample benchmark:
CPU flags: 0x1ff
CPU features: SSE2 SSSE3 SSE41 SSE42 SHA AVX AVX2 CRC32C_PCL
Block size: 4096
Iterations: 1000000
Implementation: builtin
Units: CPU cycles
NULL-NOP: cycles: 77177218, cycles/i 77
NULL-MEMCPY: cycles: 226313072, cycles/i 226, 62133.395 MiB/s
CRC32C-ref: cycles: 24418596066, cycles/i 24418, 575.859 MiB/s
CRC32C-NI: cycles: 1188335920, cycles/i 1188, 11833.073 MiB/s
CRC32C-PCL: cycles: 463193456, cycles/i 463, 30358.037 MiB/s
XXHASH: cycles: 851606646, cycles/i 851, 16511.916 MiB/s
SHA256-ref: cycles: 74476234956, cycles/i 74476, 188.808 MiB/s
SHA256-NI: cycles: 34198637428, cycles/i 34198, 411.177 MiB/s
BLAKE2-ref: cycles: 14761411664, cycles/i 14761, 952.597 MiB/s
BLAKE2-SSE2: cycles: 18101896796, cycles/i 18101, 776.807 MiB/s
BLAKE2-SSE41: cycles: 12599091062, cycles/i 12599, 1116.087 MiB/s
BLAKE2-AVX2: cycles: 9668247506, cycles/i 9668, 1454.418 MiB/s
The new implementation is about 2.5x faster.
Note: there new version does not work on musl because of linkage
problems (relocations in .rodata), so it's still using the old
implementation.
Signed-off-by: David Sterba <dsterba@suse.com>
2023-02-21 21:18:13 +00:00
|
|
|
TARGET_CPU = @target_cpu@
|
|
|
|
HAVE_GLIBC = @HAVE_GLIBC@
|
2023-02-09 13:58:08 +00:00
|
|
|
|
2017-01-30 10:04:16 +00:00
|
|
|
SUBST_CFLAGS = @CFLAGS@
|
|
|
|
SUBST_LDFLAGS = @LDFLAGS@
|
|
|
|
|
2024-05-24 23:09:52 +00:00
|
|
|
LIBBTRFS_MAJOR=@LIBBTRFS_MAJOR@
|
|
|
|
LIBBTRFS_MINOR=@LIBBTRFS_MINOR@
|
|
|
|
LIBBTRFS_PATCHLEVEL=@LIBBTRFS_PATCHLEVEL@
|
2021-09-30 12:06:32 +00:00
|
|
|
LIBS_BASE = @UUID_LIBS@ @BLKID_LIBS@ @LIBUDEV_LIBS@ -L. -pthread
|
2017-09-08 20:29:23 +00:00
|
|
|
LIBS_COMP = @ZLIB_LIBS@ @LZO2_LIBS@ @ZSTD_LIBS@
|
2018-02-27 15:19:51 +00:00
|
|
|
LIBS_PYTHON = @PYTHON_LIBS@
|
2023-11-16 13:54:03 +00:00
|
|
|
LIBS_CRYPTO = @GCRYPT_LIBS@ @SODIUM_LIBS@ @KCAPI_LIBS@ @BOTAN_LIBS@ @OPENSSL_LIBS@
|
2021-02-17 12:55:14 +00:00
|
|
|
STATIC_LIBS_BASE = @UUID_LIBS_STATIC@ @BLKID_LIBS_STATIC@ -L. -pthread
|
2017-09-08 20:29:23 +00:00
|
|
|
STATIC_LIBS_COMP = @ZLIB_LIBS_STATIC@ @LZO2_LIBS_STATIC@ @ZSTD_LIBS_STATIC@
|
2017-01-30 10:04:16 +00:00
|
|
|
|
|
|
|
prefix ?= @prefix@
|
|
|
|
exec_prefix = @exec_prefix@
|
|
|
|
bindir = @bindir@
|
|
|
|
libdir ?= @libdir@
|
Add libbtrfsutil
Currently, users wishing to manage Btrfs filesystems programatically
have to shell out to btrfs-progs and parse the output. This isn't ideal.
The goal of libbtrfsutil is to provide a library version of as many of
the operations of btrfs-progs as possible and to migrate btrfs-progs to
use it.
Rather than simply refactoring the existing btrfs-progs code, the code
has to be written from scratch for a couple of reasons:
* A lot of the btrfs-progs code was not designed with a nice library API
in mind in terms of reusability, naming, and error reporting.
* libbtrfsutil is licensed under the LGPL, whereas btrfs-progs is under
the GPL, which makes it dubious to directly copy or move the code.
Eventually, most of the low-level btrfs-progs code should either live in
libbtrfsutil or the shared kernel/userspace filesystem code, and
btrfs-progs will just be the CLI wrapper.
This first commit just includes the build system changes, license,
README, and error reporting helper.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-02-15 19:04:47 +00:00
|
|
|
incdir = @includedir@
|
2017-01-30 10:04:16 +00:00
|
|
|
udevdir = @UDEVDIR@
|
|
|
|
udevruledir = ${udevdir}/rules.d
|
2020-08-20 04:36:18 +00:00
|
|
|
pkgconfigdir = @pkgconfigdir@
|
2017-01-30 10:04:16 +00:00
|
|
|
|
|
|
|
# external libs required by various binaries; for btrfs-foo,
|
|
|
|
# specify btrfs_foo_libs = <list of libs>; see $($(subst...)) rules in Makefile
|
2017-08-22 16:30:43 +00:00
|
|
|
btrfs_convert_libs = @EXT2FS_LIBS@ @COM_ERR_LIBS@ @REISERFS_LIBS@
|
2017-01-30 10:04:16 +00:00
|
|
|
|
|
|
|
MAKEFILE_INC_INCLUDED = yes
|