2020-11-15 07:35:31 +03:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2022-02-16 22:48:01 +03:00
|
|
|
PHONY += checkabi storeabi check_libabi_version allow_libabi_only_for_x86_64
|
2020-11-15 07:35:31 +03:00
|
|
|
|
2022-02-16 22:48:01 +03:00
|
|
|
check_libabi_version:
|
|
|
|
libabiversion=`abidw -v | $(SED) 's/[^0-9]//g'`; \
|
|
|
|
if test $$libabiversion -lt "200"; then \
|
|
|
|
/bin/echo -e "\n" \
|
|
|
|
"*** Please use libabigail 2.0.0 version or newer;\n" \
|
|
|
|
"*** otherwise results are not consistent!\n" \
|
|
|
|
"(or see https://github.com/openzfs/libabigail-docker )\n"; \
|
|
|
|
exit 1; \
|
|
|
|
fi;
|
|
|
|
|
|
|
|
allow_libabi_only_for_x86_64:
|
|
|
|
echo '*** ABI definitions provided apply only to x86_64 architecture'
|
|
|
|
echo '*** Skipping `checkabi`/`storeabi` target and assuming success.'
|
|
|
|
|
|
|
|
if TARGET_CPU_X86_64
|
|
|
|
checkabi: check_libabi_version
|
2020-11-15 07:35:31 +03:00
|
|
|
for lib in $(lib_LTLIBRARIES) ; do \
|
|
|
|
abidiff --no-unreferenced-symbols \
|
|
|
|
--headers-dir1 ../../include \
|
|
|
|
--suppressions $${lib%.la}.suppr \
|
|
|
|
$${lib%.la}.abi .libs/$${lib%.la}.so ; \
|
|
|
|
done
|
|
|
|
|
2022-02-16 22:48:01 +03:00
|
|
|
storeabi: check_libabi_version
|
2020-11-15 07:35:31 +03:00
|
|
|
cd .libs ; \
|
|
|
|
for lib in $(lib_LTLIBRARIES) ; do \
|
2021-07-18 17:37:36 +03:00
|
|
|
abidw --no-show-locs \
|
|
|
|
--no-corpus-path \
|
2021-08-31 21:52:05 +03:00
|
|
|
--no-comp-dir-path \
|
|
|
|
--type-id-style hash \
|
2021-07-18 17:37:36 +03:00
|
|
|
$${lib%.la}.so > ../$${lib%.la}.abi ; \
|
2020-11-15 07:35:31 +03:00
|
|
|
done
|
2022-02-16 22:48:01 +03:00
|
|
|
else
|
|
|
|
checkabi: allow_libabi_only_for_x86_64
|
|
|
|
storeabi: allow_libabi_only_for_x86_64
|
|
|
|
endif
|