public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [Patch] Bug 19272 - abipkgdiff doesn't report arch differences
@ 2016-01-01  0:00 Ondrej Oprala
  2016-01-01  0:00 ` Dodji Seketeli
  0 siblings, 1 reply; 2+ messages in thread
From: Ondrej Oprala @ 2016-01-01  0:00 UTC (permalink / raw)
  To: libabigail

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

Hi Dodji,

After a few months of silence, I finally picked out something from the BZ ;)

Cheers,

   Ondrej


[-- Attachment #2: 0001-Bug-19272-abipkgdiff-doesn-t-report-arch-change.patch --]
[-- Type: text/x-patch, Size: 2965 bytes --]

From 003408102c8875c7de40a6d0322820bf11ece522 Mon Sep 17 00:00:00 2001
From: Ondrej Oprala <ondrej.oprala@gmail.com>
Date: Fri, 9 Dec 2016 23:01:58 +0100
Subject: [PATCH] Bug 19272 -  abipkgdiff doesn't report arch change

Previously, architecture change wasn't included in the incompatible
changes check.

Basically, this patch adds a call to corpus_diff::architecture_changed()
wherever corpus_diff::soname_changed() is called.

Also, abipkgdiff seemed to only start reporting differences if a
compatible ABI change was found.

	* src/abg-comparison.cc (corpus_diff::has_incompatible_changes):
	Check for an architecture change and return true if there was
	one.
	* tools/abicompat.cc (perform_compat_check_in_normal_mode):
	Likewise.
	* tools/abipkgdiff.cc (pthread_routine_compare): Report
	differences for {in,}compatible changes alike.

Signed-off-by: Ondrej Oprala <ondrej.oprala@gmail.com>
---
 src/abg-comparison.cc | 2 +-
 tools/abicompat.cc    | 2 ++
 tools/abipkgdiff.cc   | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index b57e7f0..320b74e 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -11953,7 +11953,7 @@ corpus_diff::has_incompatible_changes() const
   const diff_stats& stats = const_cast<corpus_diff*>(this)->
     apply_filters_and_suppressions_before_reporting();
 
-  return (soname_changed()
+  return (soname_changed() || architecture_changed()
 	  || stats.net_num_func_removed() != 0
 	  || (stats.num_func_with_virtual_offset_changes() != 0
 	      // If all reports about functions with sub-type changes
diff --git a/tools/abicompat.cc b/tools/abicompat.cc
index 9891795..159ad5f 100644
--- a/tools/abicompat.cc
+++ b/tools/abicompat.cc
@@ -374,6 +374,7 @@ perform_compat_check_in_normal_mode(options& opts,
     changes->apply_filters_and_suppressions_before_reporting();
 
   if (changes->soname_changed()
+      || changes->architecture_changed()
       || s.num_func_removed() != 0
       || s.num_vars_removed() != 0
       || s.num_func_syms_removed() != 0
@@ -395,6 +396,7 @@ perform_compat_check_in_normal_mode(options& opts,
       status |= abigail::tools_utils::ABIDIFF_ABI_CHANGE;
 
       bool abi_broke_for_sure = changes->soname_changed()
+	|| changes->architecture_changed()
 	|| s.num_vars_removed()
 	|| s.num_func_removed()
 	|| s.num_var_syms_removed()
diff --git a/tools/abipkgdiff.cc b/tools/abipkgdiff.cc
index a5c3901..24aa06e 100644
--- a/tools/abipkgdiff.cc
+++ b/tools/abipkgdiff.cc
@@ -1236,7 +1236,8 @@ pthread_routine_compare(vector<compare_args_sptr> *args)
 			    a->opts, env, diff, ctxt);
 
       const string key = a->elf1.path;
-      if ((s & abigail::tools_utils::ABIDIFF_ABI_CHANGE)
+      if ((s & (abigail::tools_utils::ABIDIFF_ABI_CHANGE |
+                abigail::tools_utils::ABIDIFF_ABI_INCOMPATIBLE_CHANGE))
 	  || (verbose && diff->has_changes()))
 	{
 	  const string prefix = "  ";
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-12 19:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-01  0:00 [Patch] Bug 19272 - abipkgdiff doesn't report arch differences Ondrej Oprala
2016-01-01  0:00 ` Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).