mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
c8970f52ed
As a bonus, this also adds zfs-mount-generator (previously undescended down) and libzstd (not included) to CppCheck As a bonus bonus, abigail rules work out-of-tree, too Against current trunk: $ diff -U0 ./destdir.listing ~/store/code/zfs/destdir.listing -destdir/usr/local/include/libspl/sscanf.h $ diff --color -U0 ./zfs-2.1.99.tar.gz.listing ../oot/zfs-2.1.99.tar.gz.listing | grep -v @@ | grep -v /Makefile -zfs-2.1.99/config/Abigail.am -zfs-2.1.99/lib/libspl/include/util/ -zfs-2.1.99/lib/libspl/include/util/sscanf.h $ diff --color -U0 ./zfs-2.1.99.tar.gz.listing ../oot/zfs-2.1.99.tar.gz.listing | grep -v @@ | grep /Makefile -zfs-2.1.99/lib/libavl/Makefile.in -zfs-2.1.99/lib/libefi/Makefile.in -zfs-2.1.99/lib/libicp/Makefile.in -zfs-2.1.99/lib/libnvpair/Makefile.in -zfs-2.1.99/lib/libshare/Makefile.in -zfs-2.1.99/lib/libspl/include/Makefile.in -zfs-2.1.99/lib/libspl/include/os/freebsd/Makefile.am -zfs-2.1.99/lib/libspl/include/os/freebsd/Makefile.in -zfs-2.1.99/lib/libspl/include/os/freebsd/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/os/freebsd/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/os/linux/Makefile.am -zfs-2.1.99/lib/libspl/include/os/linux/Makefile.in -zfs-2.1.99/lib/libspl/include/os/linux/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/os/linux/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/os/Makefile.am -zfs-2.1.99/lib/libspl/include/os/Makefile.in -zfs-2.1.99/lib/libspl/include/rpc/Makefile.am -zfs-2.1.99/lib/libspl/include/rpc/Makefile.in -zfs-2.1.99/lib/libspl/include/sys/dktp/Makefile.am -zfs-2.1.99/lib/libspl/include/sys/dktp/Makefile.in -zfs-2.1.99/lib/libspl/include/sys/Makefile.am -zfs-2.1.99/lib/libspl/include/sys/Makefile.in -zfs-2.1.99/lib/libspl/include/util/Makefile.am -zfs-2.1.99/lib/libspl/include/util/Makefile.in -zfs-2.1.99/lib/libspl/Makefile.in -zfs-2.1.99/lib/libtpool/Makefile.in -zfs-2.1.99/lib/libunicode/Makefile.in -zfs-2.1.99/lib/libuutil/Makefile.in -zfs-2.1.99/lib/libzfsbootenv/Makefile.in -zfs-2.1.99/lib/libzfs_core/Makefile.in -zfs-2.1.99/lib/libzfs/Makefile.in -zfs-2.1.99/lib/libzpool/Makefile.in -zfs-2.1.99/lib/libzstd/Makefile.in -zfs-2.1.99/lib/libzutil/Makefile.in -zfs-2.1.99/lib/Makefile.in Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
124 lines
4.7 KiB
Makefile
124 lines
4.7 KiB
Makefile
#
|
|
# Shown below is a simplified dependency graph of the OpenZFS provided
|
|
# libraries. Administrative commands (`zfs`, `zpool`, etc) interface with
|
|
# the kernel modules using the `libzfs.so` and `libzfs_core.so` libraries.
|
|
# These libraries provide a stable ABI across OpenZFS point releases.
|
|
#
|
|
# The `libzpool.so` library is a user space build of the DMU and SPA layers
|
|
# used to implement debugging tools (zdb) and code validation tools (ztest).
|
|
# These library interfaces are subject to change at any time.
|
|
#
|
|
#
|
|
# CMDS: zhack/ztest/zdb/ zfs/zpool/zed/
|
|
# raidz_{test,bench} zinject/zstream
|
|
# | |
|
|
# LIBS: | | libzfsbootenv*
|
|
# | | |
|
|
# | | |
|
|
# libzpool libzfs* ----------------+
|
|
# | | | \ / | | |
|
|
# libicp --/ | | \ / | | \------- libshare
|
|
# | | \ / | |
|
|
# libzstd ---/ | \ / | \--------- libuutil
|
|
# | \ / \ | |
|
|
# libunicode --/ \ / \ | |
|
|
# \ / \ | |
|
|
# libzutil libzfs_core* | |
|
|
# | | | | \ | | | |
|
|
# | | | | | | | | |
|
|
# | | | | | | | | |
|
|
# libtpool -------------/ | | | \---- libnvpair* | | |
|
|
# | | | | | |
|
|
# libefi -----------------/ | \------ libavl* --------/ |
|
|
# | | |
|
|
# \-------- libspl ----+------/
|
|
#
|
|
#
|
|
# NB: GNU Automake Manual, Chapter 8.3.5: Libtool Convenience Libraries
|
|
# These nine libraries are intermediary build components.
|
|
#
|
|
# * - A stable ABI is provided for these libraries;
|
|
# when performing an ABI check the following options are applied:
|
|
#
|
|
# --no-unreferenced-symbols: Exclude symbols which are not referenced by
|
|
# any debug information. Without this _init() and _fini() are incorrectly
|
|
# reported on CentOS7 for libuutil.so.
|
|
#
|
|
# --headers-dir1: Limit ABI checks to public OpenZFS headers, otherwise
|
|
# changes in public system headers are also reported.
|
|
#
|
|
# --suppressions: Honor a suppressions file for each library to provide
|
|
# a mechanism for suppressing harmless warnings.
|
|
#
|
|
|
|
noinst_LTLIBRARIES =
|
|
lib_LTLIBRARIES =
|
|
pkgconfig_DATA =
|
|
include $(srcdir)/%D%/libavl/Makefile.am
|
|
include $(srcdir)/%D%/libicp/Makefile.am
|
|
include $(srcdir)/%D%/libnvpair/Makefile.am
|
|
include $(srcdir)/%D%/libshare/Makefile.am
|
|
include $(srcdir)/%D%/libspl/Makefile.am
|
|
include $(srcdir)/%D%/libtpool/Makefile.am
|
|
include $(srcdir)/%D%/libunicode/Makefile.am
|
|
include $(srcdir)/%D%/libuutil/Makefile.am
|
|
include $(srcdir)/%D%/libzfs_core/Makefile.am
|
|
include $(srcdir)/%D%/libzfs/Makefile.am
|
|
include $(srcdir)/%D%/libzfsbootenv/Makefile.am
|
|
include $(srcdir)/%D%/libzpool/Makefile.am
|
|
include $(srcdir)/%D%/libzstd/Makefile.am
|
|
include $(srcdir)/%D%/libzutil/Makefile.am
|
|
if BUILD_LINUX
|
|
include $(srcdir)/%D%/libefi/Makefile.am
|
|
endif
|
|
|
|
|
|
PHONY += lib
|
|
lib: $(noinst_LTLIBRARIES) $(lib_LTLIBRARIES)
|
|
|
|
|
|
PHONY += checkabi storeabi check_libabi_version allow_libabi_only_for_x86_64
|
|
|
|
check_libabi_version:
|
|
if [ $$(abidw -v | $(SED) 's/[^0-9]//g') -lt 200 ]; then \
|
|
printf '%s\n' "" \
|
|
"*** Please use libabigail 2.0.0 version or newer;" \
|
|
"*** otherwise results are not consistent!" \
|
|
"(or see https://github.com/openzfs/libabigail-docker)"; \
|
|
exit 1; \
|
|
fi
|
|
|
|
allow_libabi_only_for_x86_64:
|
|
echo '*** ABI definitions provided apply only to x86_64:'
|
|
echo '*** not checking or storing ABI and assuming success.'
|
|
|
|
if TARGET_CPU_X86_64
|
|
# These should depend on $(lib_LTLIBRARIES), but this breaks on CI when bound into Docker
|
|
checkabi: check_libabi_version
|
|
err=0; \
|
|
for lib in $(lib_LTLIBRARIES); do \
|
|
lib=$${lib%.la}; \
|
|
[ -f $(srcdir)/lib/$$lib/$$lib.suppr ] || continue; \
|
|
echo $$lib:; \
|
|
abidiff --no-unreferenced-symbols \
|
|
--headers-dir1 include \
|
|
--suppressions $(srcdir)/lib/$$lib/$$lib.suppr \
|
|
$(srcdir)/lib/$$lib/$$lib.abi .libs/$$lib.so || err=$$((err + 1)); \
|
|
done; \
|
|
exit $$err
|
|
|
|
storeabi: check_libabi_version
|
|
for lib in $(lib_LTLIBRARIES); do \
|
|
lib=$${lib%.la}; \
|
|
[ -f $(srcdir)/lib/$$lib/$$lib.suppr ] || continue; \
|
|
abidw --no-show-locs \
|
|
--no-corpus-path \
|
|
--no-comp-dir-path \
|
|
--type-id-style hash \
|
|
.libs/$$lib.so > $(srcdir)/lib/$$lib/$$lib.abi; \
|
|
done
|
|
else
|
|
checkabi: allow_libabi_only_for_x86_64
|
|
storeabi: allow_libabi_only_for_x86_64
|
|
endif
|