aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAntonio Russo <[email protected]>2020-11-14 21:35:31 -0700
committerBrian Behlendorf <[email protected]>2020-11-17 09:18:52 -0800
commit14c34c3d49319a0fea937d54167602c43ff9d93f (patch)
tree7ca38e771ad64cb64fcc1817e01a0029fe4f7639 /config
parente6c59cd171bf141eae232db2f4c33ff79d5862c3 (diff)
Library ABI tracking with abigail
Provide two make targets: checkabi and storeabi. storeabi uses libabigail to generate a reference copy of the ABI for the public libraries. checkabi compares such a reference to the compiled version, failing if they are not compatible. No ABI is generated for libzpool.so, it is only used by ztest and zdb and not external consumers. Co-authored-by: Brian Behlendorf <[email protected]> Signed-off-by: Antonio Russo <[email protected]> Closes #11144
Diffstat (limited to 'config')
-rw-r--r--config/Abigail.am29
1 files changed, 29 insertions, 0 deletions
diff --git a/config/Abigail.am b/config/Abigail.am
new file mode 100644
index 000000000..599f61194
--- /dev/null
+++ b/config/Abigail.am
@@ -0,0 +1,29 @@
+#
+# 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.
+#
+
+PHONY += checkabi storeabi
+
+checkabi:
+ 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
+
+storeabi:
+ cd .libs ; \
+ for lib in $(lib_LTLIBRARIES) ; do \
+ abidw $${lib%.la}.so > ../$${lib%.la}.abi ; \
+ done