public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] configure: add more diagnostic options when ABIGAIL_DEVEL is set
@ 2020-05-15  9:20 Matthias Maennich
  2020-05-18  8:44 ` Dodji Seketeli
  0 siblings, 1 reply; 3+ messages in thread
From: Matthias Maennich @ 2020-05-15  9:20 UTC (permalink / raw)
  To: libabigail; +Cc: dodji, gprocida, kernel-team, maennich

When exporting ABIGAIL_DEVEL=1, add more flags to ABIGAIL_DEVEL that are
suitable for development to find issues during edit/compile/test time.

To accommodate the need for checked return values of system(), adjust
the tests to explicitely ignore them.

Note, unless bug #25989 is addressed, runtestannotate is failing.
See https://sourceware.org/bugzilla/show_bug.cgi?id=25989 for details.

	* configure.ac: add -D_FORTIFY_SOURCE=2 and -D_GLIBCXX_DEBUG
	compilation defines if ABIGAIL_DEVEL is set

Signed-off-by: Matthias Maennich <maennich@google.com>
---
 configure.ac              | 4 ++--
 tests/test-diff-filter.cc | 2 +-
 tests/test-diff-pkg.cc    | 2 +-
 tests/test-read-write.cc  | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 1d6fe56bb757..fa4a0a947969 100644
--- a/configure.ac
+++ b/configure.ac
@@ -617,8 +617,8 @@ DEPS_LIBS="$XML_LIBS $LIBZIP_LIBS $ELF_LIBS $DW_LIBS"
 AC_SUBST(DEPS_LIBS)
 
 if test x$ABIGAIL_DEVEL != x; then
-   CFLAGS="-g -Wall -Wextra -Werror"
-   CXXFLAGS="-g -Wall -Wextra -Werror"
+   CFLAGS="-g -Wall -Wextra -Werror -D_FORTIFY_SOURCE=2"
+   CXXFLAGS="-g -Wall -Wextra -Werror -D_FORTIFY_SOURCE=2 -D_GLIBCXX_DEBUG"
 fi
 
 if test x$ABIGAIL_DEBUG != x; then
diff --git a/tests/test-diff-filter.cc b/tests/test-diff-filter.cc
index 000da6da188b..60f9c769148a 100644
--- a/tests/test-diff-filter.cc
+++ b/tests/test-diff-filter.cc
@@ -708,7 +708,7 @@ main()
 	{
 	  is_ok = false;
 	  if (!t->diff_cmd.empty())
-	    system(t->diff_cmd.c_str());
+	    (void)system(t->diff_cmd.c_str());
 	  if (!t->error_message.empty())
 	    cerr << t->error_message << '\n';
 	}
diff --git a/tests/test-diff-pkg.cc b/tests/test-diff-pkg.cc
index 51f117a47833..68e095226d92 100644
--- a/tests/test-diff-pkg.cc
+++ b/tests/test-diff-pkg.cc
@@ -840,7 +840,7 @@ main()
 	{
 	  is_ok = false;
 	  if (!t->diff_cmd.empty())
-	    system(t->diff_cmd.c_str());
+	    (void)system(t->diff_cmd.c_str());
 	  if (!t->error_message.empty())
 	    cerr << t->error_message << '\n';
 	}
diff --git a/tests/test-read-write.cc b/tests/test-read-write.cc
index f32fc25d6191..52da379461cf 100644
--- a/tests/test-read-write.cc
+++ b/tests/test-read-write.cc
@@ -404,7 +404,7 @@ main()
 	    cerr << t->error_message << '\n';
 
 	  if (!t->diff_cmd.empty())
-	    system(t->diff_cmd.c_str());
+	    (void)system(t->diff_cmd.c_str());
 	}
     }
 
-- 
2.26.2.761.g0e0b3e54be-goog


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

end of thread, other threads:[~2020-05-18  9:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15  9:20 [PATCH] configure: add more diagnostic options when ABIGAIL_DEVEL is set Matthias Maennich
2020-05-18  8:44 ` Dodji Seketeli
2020-05-18  9:01   ` Matthias Maennich

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).