2020-05-29 14:26:04 +00:00
|
|
|
## SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2015-11-14 17:32:01 +00:00
|
|
|
SUBDIRS = include src tools tests doc bash-completion
|
2013-02-28 10:42:57 +00:00
|
|
|
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
|
|
|
|
headers = config.h
|
|
|
|
|
2013-05-07 10:42:53 +00:00
|
|
|
m4datadir = $(datadir)/aclocal
|
2013-05-21 14:19:32 +00:00
|
|
|
m4data_DATA = $(srcdir)/abigail.m4
|
2013-05-07 10:42:53 +00:00
|
|
|
|
2013-08-22 14:57:42 +00:00
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
|
|
|
pkgconfig_DATA = libabigail.pc
|
|
|
|
|
Bug 20180 - Support system-wide suppression specifications
This patch adds support for loading system and user level suppression
specifications for libabigail tools.
At launch time, relevant libabigail tools (abidiff, abipkgdiff
fedabipkgdiff for now) read the default system suppression
specification file, if it's present, from a file which path is the
value of the environment variable
LIBABIGAIL_DEFAULT_SYSTEM_SUPPRESSION_FILE, if set, or from the file
$libdir/libabigail/default.abignore.
Then it reads the user system suppression specification file, if it's
present, from a file which path is the value of the environment
variable LIBABIGAIL_DEFAULT_USER_SUPPRESSION_FILE, if set, or from the
file $HOME/.abignore.
The content of the user system suppression file is merged with the
content of default system suppression file.
That content is also merged with the content of the suppression
specification files that might be provided by the --suppressions
command line option of the invoked tools.
The resulting set of all these suppression specifications is thus used
to filter the ABI change reports that are emitted.
abidiff, abipkgdiff and abipkgdiff gain a --no-default-suppression
option to avoid loading any of these default suppression specification
files.
The patch also installs a default.abignore file into $(pkglibdir).
Note that on x86_64, that directory is /usr/lib64/libabigail. Now we
just need to think about the content of that default.abignore file.
* doc/manuals/abidiff.rst: Document the default suppression
scheme, its interaction with the --supprs option and the new
--no-default option.
* doc/manuals/abipkgdiff.rst: Likewise.
* doc/manuals/fedabipkgdiff.rst: Likewise.
* configure.ac: Generate the tests/runtestdefaultsupprs.py file
from the new tests/runtestdefaultsupprs.py.in template.
* default.abignore: New file.
* Makefile.am: Add it to source distribution.
* src/Makefile.am: Define the ABIGAIL_ROOT_SYSTEM_LIBDIR
preprocessor macro that is set the value of the $libdir autotools
macro.
* include/abg-tools-utils.h: Update copyright years.
(get_system_libdir, get_default_system_suppression_file_path)
(get_default_user_suppression_file_path)
(load_default_system_suppressions)
(load_default_user_suppressions): Declare new functions
* src/abg-tools-utils.cc (get_system_libdir)
(get_default_system_suppression_file_path)
(get_default_user_suppression_file_path)
(load_default_system_suppressions)
(load_default_user_suppressions): Define new functions.
(is_regular_file): Amend this so that it return true for symlinks
to regular files too.
(is_dir): Amend this so that it returns true for symlinks to
directories too.
* tools/abidiff.cc (options::no_default_supprs): New data member.
(options::options): Initialize the new data member.
(display_usage): Display a new help string for the new
--no-default-suppression command line option.
(parse_command_line): Parse this new command line option.
(set_diff_context_from_opts): Load the default suppression
specifications, unless --no-default-suppression or --supprs was
provided.
* tools/abipkgdiff.cc (options::no_default_supprs): New data
member.
(options::options): Initialize the new data member.
(parse_command_line): Parse the new --no-default-suppression
command line option.
(main): Load the default suppression specifications, unless
--no-default-suppression or --supprs was provided.
* tools/fedabipkgdiff (abipkgdiff): Add --no-default-suppression
to the invocation of abipkgdiff if it was provided on the command
line.
(build_commandline_args_parser): Parse the new
--no-default-suppression command line option.
* tests/runtestdefaultsupprs.py.in: New test harness template.
* tests/Makefile.am: Add the new runtestdefaultsupprs.py to the
set of tests.
* tests/data/test-default-supprs/test0-type-suppr-0.suppr: New
test input.
* tests/data/test-default-supprs/test0-type-suppr-report-0.txt: Likewise.
* tests/data/test-default-supprs/test0-type-suppr-v0.o: Likewise.
* tests/data/test-default-supprs/test0-type-suppr-v1.o: Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir-report-0.txt:
Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir1: Likewise.
* tests/data/test-default-supprs/dirpkg-1-dir2: Likewise.
* tests/data/Makefile.am: Add new the new tests input above to
Makefile.am.
* tests/runtestcanonicalizetypes.sh.in: Pass
--no-default-suppression to abidiff invocations.
* tests/runtestdefaultsupprs.py.in: Likewise.
* tests/test-abidiff-exit.cc: Likewise.
* tests/test-diff-dwarf-abixml.cc: Likewise.
* tests/test-diff-filter.cc: Likewise.
* tests/test-diff-suppr.cc: Likewise.
* tools/abidiff.cc: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-05-30 08:37:48 +00:00
|
|
|
dist_noinst_DATA = default.abignore
|
|
|
|
abigaillibdir = $(pkglibdir)
|
|
|
|
abigaillib_DATA = default.abignore
|
|
|
|
|
2015-11-14 17:32:01 +00:00
|
|
|
#bashcompletiondir = $(datadir)/bash-completion/completions
|
|
|
|
#dist_bashcompletion_DATA =
|
|
|
|
|
2015-04-20 11:22:59 +00:00
|
|
|
EXTRA_DIST = \
|
2016-06-03 14:36:52 +00:00
|
|
|
autoconf-archive/ax_check_python_modules.m4 \
|
Bug 19428 - New fedabipkgdiff utility
fedabipkgdiff is a convenient way to compare the ABI of Fedora
packages easily.
The first version of fedabipkgdiff introduced by this patch lets users
perform operations like:
fedabipkgdiff --from fc23 foo-0.1-1.fc23.x86_64.rpm
fedabipkgdiff --from fc23 --to fc24 foo
fedabipkgdiff foo-0.1-1.fc23 foo-0.1-1.fc24
fedabipkgdiff foo-0.1-1.fc23.i686 foo-0.1-1.fc24.i686
fedabipkgdiff --all-subpackages foo-0.1-1.fc23 foo-0.1-1.fc24
* autoconf-archive/ax_compare_version.m4: New file copied from the
autoconf-archive project.
* autoconf-archive/ax_prog_python_version.m4: Likewise.
* autoconf-archive/ax_python_module.m4: Likewise.
* Makefile.am: Add the new files above to the source distribution.
* configure.ac: Include the new m4 macros from the autoconf
archive. Add a new --enable-fedabipkgdiff option. Update the
report at the end of the configure process to show the status of
the fedabipkgdiff feature. Add check for prerequisite python
modules argparse, glob, logging, os, re, shlex, subprocess, sys,
itertools, urlparse, itertools, shutil, unittest, xdg, koji and
mock. These are necessary for the unit test of
fedabipkgdiff. Generate tests/runtestfedabipkgdiff.py into the
build directory, from the tests/runtestfedabipkgdiff.py.in input
file.
* tools/Makefile.am: Include the fedabipkgdiff to the source
distribution and install it if the "fedabipkgdiff" feature is
enabled.
* tests/Makefile.am: Rename runtestfedabipkgdiff.sh into
runtestfedabipkgdiff.py. Add the new runtestfedabipkgdiff.py.in
autoconf template file in here.
* tests/runtestfedabipkgdiff.py.in: New unit test file.
* tools/fedabipkgdiff: New fedabipkgdiff tool.
* doc/manuals/fedabipkgdiff.rst: New manual.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2016-02-09 10:05:33 +00:00
|
|
|
autoconf-archive/ax_prog_python_version.m4 \
|
|
|
|
autoconf-archive/ax_compare_version.m4 \
|
2020-12-02 16:19:40 +00:00
|
|
|
NEWS README LICENSE.txt license-change-2020.txt \
|
|
|
|
COMPILING COMMIT-LOG-GUIDELINES VISIBILITY \
|
|
|
|
ChangeLog gen-changelog.py \
|
2015-04-20 11:22:59 +00:00
|
|
|
$(headers) $(m4data_DATA) \
|
2013-08-22 14:57:42 +00:00
|
|
|
libabigail.pc.in
|
2014-11-18 22:08:13 +00:00
|
|
|
|
2016-01-26 10:46:50 +00:00
|
|
|
# automake already tells which subdir is being entered.
|
|
|
|
# Don't make make repeat.
|
|
|
|
AM_MAKEFLAGS = --no-print-directory
|
|
|
|
|
2016-04-27 13:39:53 +00:00
|
|
|
.PHONY: doc
|
|
|
|
|
|
|
|
doc: html-doc man info
|
|
|
|
|
|
|
|
html-doc:
|
|
|
|
$(MAKE) -C doc html-doc
|
|
|
|
$(MAKE) -C doc/manuals html-doc
|
|
|
|
|
|
|
|
man:
|
|
|
|
$(MAKE) -C doc/manuals man
|
|
|
|
|
|
|
|
info:
|
|
|
|
$(MAKE) -C doc/manuals info
|
|
|
|
|
2016-05-25 08:24:02 +00:00
|
|
|
check-valgrind:
|
|
|
|
$(MAKE) -C tests check-valgrind
|
|
|
|
|
2016-05-22 22:10:07 +00:00
|
|
|
check-valgrind-recursive:
|
|
|
|
$(MAKE) -C tests check-valgrind-memcheck-recursive
|
|
|
|
|
2014-11-18 22:08:13 +00:00
|
|
|
update-changelog:
|
|
|
|
python $(srcdir)/gen-changelog.py > $(srcdir)/ChangeLog
|
|
|
|
|
2016-04-17 19:14:31 +00:00
|
|
|
TARBALL = $(PACKAGE_NAME)-$(VERSION).tar.gz
|
2014-11-18 22:08:13 +00:00
|
|
|
RELEASED_BRANCH = master
|
2016-04-17 19:14:31 +00:00
|
|
|
|
|
|
|
$(TARBALL): distcheck
|
|
|
|
|
2014-11-18 22:08:13 +00:00
|
|
|
tag-release-only:
|
|
|
|
git tag -m "$(PACKAGE_NAME) release $(VERSION)" \
|
|
|
|
"$(PACKAGE_NAME)-$(VERSION)" $(RELEASED_BRANCH)
|
|
|
|
|
|
|
|
tag-release: tag-release-only
|
|
|
|
|
2016-04-17 19:14:31 +00:00
|
|
|
upload-release-only:
|
2021-10-04 14:06:43 +00:00
|
|
|
scp $(TARBALL) sourceware.org:/var/ftp/pub/libabigail
|
2016-04-17 19:14:31 +00:00
|
|
|
|
|
|
|
tarball: $(TARBALL)
|
|
|
|
|
2018-03-06 17:08:22 +00:00
|
|
|
upload-release: tarball tag-release upload-release-only
|
2014-11-18 22:08:13 +00:00
|
|
|
|
2016-04-17 19:14:31 +00:00
|
|
|
release: upload-release
|
2018-03-06 17:08:22 +00:00
|
|
|
|
|
|
|
upload-release: tarball-and-tag-and-upload
|
|
|
|
|
|
|
|
tarball-and-tag-and-upload: tarball-and-all
|
|
|
|
|
|
|
|
tarball-and-all: tag-and-all
|
|
|
|
$(MAKE) tarball
|
|
|
|
|
2020-12-01 14:11:50 +00:00
|
|
|
tag-and-all: distcheck check-self-compare
|
2018-03-06 17:08:22 +00:00
|
|
|
$(MAKE) tag-release-only
|
2020-04-20 07:46:05 +00:00
|
|
|
|
|
|
|
# the default for GZIP_ENV is --best, which is pretty slow for check runs
|
|
|
|
# distcheck-fast therefore compresses with --fast instead
|
|
|
|
distcheck-fast:
|
|
|
|
$(MAKE) distcheck GZIP_ENV="--fast"
|
|
|
|
|
Bug 26769 - Fix missing types in abixml output
The symptom of the issue at hand is that sometimes there can be types
missing from the abixml output. This happens when analysing some C++
code bases.
The core of the issue is the following. Support we have a type
"struct S" defined somewhere as:
struct S // #0
{
int dm1;
char dm2;
};
S s;
Suppose that in another translation unit, we have the class 'S' being
extended to add a member type to it:
struct S // #1
{
typedef int dm1_type;
};
typedef S::dm1_type Integer;
Integer something;
When emitting the abixml for the codebase, the definition of the
typedef S::dm1_type can be missing.
Note that in location #1, struct S is considered declaration-only.
It's definition is in another translation unit, in location #0.
So the abixml writer emits the 'struct S' defined in location #0, but
forgets to emit the 'struct S' in #1, which is indirectly used for the
sole purpose of using its member type S::dm1_type.
This patch emits the S::dm1_type type that is mistakenly forgotten
today.
Now that the "struct S" of #1 is also emitted, a tangent problem is
uncovered: S in #0 can be wrongly thought to be equivalent to S in #1,
for ABI purposes
This is because of an ODR-based optimization that is used for C++.
That is, the two struct S can be wrongly considered equivalent just
because they have the same name. Note that ODR means "One Definition Rule[1]"
This patch removes the ODR-based optimization and thus fixes many of
the issues uncovered by the previous changes.
The patch also uncovered that some non-static variables were sometimes wrongly
being added to the set of exported variables, while libabigail reads
corpora from abixml. The patch fixes this as well.
[1]: One Definition Rule: https://en.wikipedia.org/wiki/One_Definition_Rule
* include/abg-corpus.h (corpus::{record_canonical_type,
lookup_canonical_type}): Remove function declarations.
* src/abg-corpus-priv.h (corpus::priv::canonical_types_): Remove
data member.
* src/abg-corpus.cc (corpus::{record_canonical_type,
lookup_canonical_type}): Remove functions.
* src/abg-ir.cc (type_eligible_for_odr_based_comparison): Remove
static function.
(type_base::get_canonical_type_for): Don't perform the ODR-based
optimization for C++ anymore.
* src/abg-reader.cc
(read_context&::maybe_add_var_to_exported_decls): Don't add a
variable that hasn't been added to its scope. Otherwise, it means
we added a variable that wasn't yet properly constructed. Also
add a new overload for var_decl_sptr&.
(build_var_decl): Do not add the var to its the set of exported
declaration before we are sure it has been fully constructed and
added to the scope it belongs.
(build_class_decl): Only add *static* data members to the list of
exported declarations.
(handle_var_decl): A var decl seen here is a global variable
declaration. Add it to the list of exported declarations.
* src/abg-writer.cc (write_context::decl_only_type_is_emitted):
Constify parameter.
(write_translation_unit): Do not forget to emit referenced types
that were maybe not canonicalized. Also, avoid using noop_deleter
when it's not necessary.
(write_namespace_decl): Do not forget to emit canonicalized types
that are present in namespaces other than the global namespace.
* tests/runtestslowselfcompare.sh.in: New test that compares
libabigail.so against its own ABIXML representation.
* tests/Makefile.am: Add the new test runtestslowselfcompare.sh to
source distribution. This test is too slow to be run during the
course of 'make check'. It takes more than 5 minutes on my slow
box here. Rather, it can be run using 'make check-self-compare'.
I plan to run this before releases now.
* tests/data/test-annotate/libtest24-drop-fns-2.so.abi: Adjust.
* tests/data/test-annotate/libtest24-drop-fns.so.abi: Likewise.
* tests/data/test-annotate/test0.abi: Likewise.
* tests/data/test-annotate/test13-pr18894.so.abi: Likewise.
* tests/data/test-annotate/test14-pr18893.so.abi: Likewise.
* tests/data/test-annotate/test15-pr18892.so.abi: Likewise.
* tests/data/test-annotate/test17-pr19027.so.abi: Likewise.
* tests/data/test-annotate/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
Likewise.
* tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
* tests/data/test-annotate/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/data/test-annotate/test21-pr19092.so.abi: Likewise.
* tests/data/test-read-dwarf/PR22015-libboost_iostreams.so.abi:
Likewise.
* tests/data/test-read-dwarf/PR22122-libftdc.so.abi: Likewise.
* tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi:
Likewise.
* tests/data/test-read-dwarf/PR26261/PR26261-exe.abi: Likewise.
* tests/data/test-read-dwarf/libtest24-drop-fns-2.so.abi:
Likewise.
* tests/data/test-read-dwarf/libtest24-drop-fns.so.abi: Likewise.
* tests/data/test-read-dwarf/test-libandroid.so.abi: Likewise.
* tests/data/test-read-dwarf/test0.abi: Likewise.
* tests/data/test-read-dwarf/test0.hash.abi: Likewise.
* tests/data/test-read-dwarf/test10-pr18818-gcc.so.abi: Likewise.
* tests/data/test-read-dwarf/test11-pr18828.so.abi: Likewise.
* tests/data/test-read-dwarf/test12-pr18844.so.abi: Likewise.
* tests/data/test-read-dwarf/test14-pr18893.so.abi: Likewise.
* tests/data/test-read-dwarf/test15-pr18892.so.abi: Likewise.
* tests/data/test-read-dwarf/test16-pr18904.so.abi: Likewise.
* tests/data/test-read-dwarf/test17-pr19027.so.abi: Likewise.
* tests/data/test-read-dwarf/test18-pr19037-libvtkRenderingLIC-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi:
Likewise.
* tests/data/test-read-dwarf/test20-pr19025-libvtkParallelCore-6.1.so.abi:
Likewise.
* tests/data/test-read-dwarf/test21-pr19092.so.abi: Likewise.
* tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi:
Likewise.
* tests/data/test-read-dwarf/test9-pr18818-clang.so.abi: Likewise.
* tests/data/test-read-write/test28-without-std-fns-ref.xml:
Likewise.
* tests/data/test-read-write/test28-without-std-vars-ref.xml:
Likewise.
* tests/data/test-read-write/test6.xml: Likewise.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
2020-11-16 11:22:05 +00:00
|
|
|
# This makes us compare libabigail.so against its own ABIXML
|
|
|
|
# representation. It's super slow (more than 5 minutes on one of my
|
|
|
|
# old boxes) so I do this only before releases.
|
|
|
|
check-self-compare:
|
|
|
|
$(MAKE) -C tests check-self-compare
|
|
|
|
|