From patchwork Fri May 15 09:20:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Matthias_M=C3=A4nnich?= X-Patchwork-Id: 39255 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1AC253851C22; Fri, 15 May 2020 09:20:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1AC253851C22 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1589534448; bh=oUVs14YO4F+/jHIH6H3ZeXdHedV7GegA+20kDhGznos=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Help: List-Subscribe:From:Reply-To:Cc:From; b=uWDzzbPnDdt1NPXk26HExOuxwafCINtcEH8Q3BLgxLLPksU/imKQoacZj9zXeFxmA wtnIhuIyj2lhQd/b5d2w3G97qdhFMQvOD4+jxTPzMF+xaoH/jjhFdMVrVKAoOrZvwV wfvsY4E90PJu5T3X3ttnPO3QmhGXCNla9SkD8MH8= X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by sourceware.org (Postfix) with ESMTPS id 061D13851C22 for ; Fri, 15 May 2020 09:20:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 061D13851C22 Received: by mail-yb1-xb49.google.com with SMTP id 186so1987495ybq.1 for ; Fri, 15 May 2020 02:20:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=oUVs14YO4F+/jHIH6H3ZeXdHedV7GegA+20kDhGznos=; b=lIJ4INoljD6omRx472XoOkdCuB0TNFgMBBf8uBKe3guK9GtlyXDh6h+ZtK0B7fScOS NIoiINJQEgyMBbo1jRrUXqY0N6jYnXCCP/l4nh5gz1SjU3eLy+NLui2UYyx2aXVKj/kf rpiyRY/X+Mr/9MnVcUGRrv3bqrd9K18bMrdsINEldZk1kKwM0kCUkXwithy6jFi1X5n+ M/nk06fnFQ2nkkHaECGxtbpRkCAu/du3EFb4HvxNisIwtiEMFrZ1FhHdUO7+ZE4Fy/ms 7kTxmJAED4OVqotJ59J1IiCmz8t/SGQ9xNuFMyxwoTdzI5jOvGt8bFo4kWkqdW1JK2So vdUw== X-Gm-Message-State: AOAM530EgETMx+qVS61aphv0McwNPrwNoiIbL5FfAX0phIqR9HR8Mc07 t5ppmG1W51v7eWV2cXK30Eygeu7JZDIZPNXE9js1ce2cT8Jebuy8XgofXNh9m7UGcvewxWHUPWO X7Rk+9YqDm69lA7ko6ZBRFJnBf7RpqUKEVp71owlJ1Jvgz0R1wRhsm9JN6jSxEaZA7EEqInM= X-Google-Smtp-Source: ABdhPJw5Yxs6fr8n4Eb+eL+ssxuXpIIPxsXzn8wN04fSZIg8Rm9+xSnf+WLLKTjYJpEbyCoTIIJz4SV2iiV6yQ== X-Received: by 2002:a25:cc04:: with SMTP id l4mr3660460ybf.307.1589534435349; Fri, 15 May 2020 02:20:35 -0700 (PDT) Date: Fri, 15 May 2020 11:20:18 +0200 Message-Id: <20200515092018.31764-1-maennich@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.26.2.761.g0e0b3e54be-goog Subject: [PATCH] configure: add more diagnostic options when ABIGAIL_DEVEL is set To: libabigail@sourceware.org X-Spam-Status: No, score=-24.5 required=5.0 tests=BAYES_00, DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: Matthias Maennich via Libabigail From: =?utf-8?q?Matthias_M=C3=A4nnich?= Reply-To: Matthias Maennich Cc: maennich@google.com, gprocida@google.com, kernel-team@android.com Errors-To: libabigail-bounces@sourceware.org Sender: "Libabigail" 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 Acked-By: Dodji Seketeli --- 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()); } }