From patchwork Fri Oct 29 09:23:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tangmeng X-Patchwork-Id: 46779 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 DD8EC385841E for ; Fri, 29 Oct 2021 09:24:00 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from smtpproxy21.qq.com (smtpbg702.qq.com [203.205.195.102]) by sourceware.org (Postfix) with ESMTPS id D55DC3858416 for ; Fri, 29 Oct 2021 09:23:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D55DC3858416 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=uniontech.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=uniontech.com X-QQ-mid: bizesmtp43t1635499429tm44z0n0 Received: from localhost.localdomain (unknown [58.240.82.166]) by esmtp6.qq.com (ESMTP) with id ; Fri, 29 Oct 2021 17:23:44 +0800 (CST) X-QQ-SSF: 0140000000200020C000000A0000000 X-QQ-FEAT: PdU/eI8FBMBVyMeYSIs0c+npC5Frlssgh6hCV69fkm9OPOl1kZ8pPpyTiXQki KHHmaGkz2j6ijTrHKyJw/v1U1BOp6OCLHQrO8VUTdkeJjOtY7R6iEtNdsF7YE3Byzbj/3Th 7qEKeklYVtpuSKlQ3r2PL8R/1g2/Q0IGjjUZsC61kqcQEK+u1u9stH2G2I8v+byEP8Sfr9X EEwqNpcEpJrKN/oYj9VGDoCeRfef21HK4QXkAWyPBJC2dnp2nfQRmVsRApqcv2uYz11lUyU szV/MVcYv/PashQSe8sMJFKbM3V73oEaTeiZbls6B/kUC8EiyxNWvEB/olHUqFULxbC7BMt o6htI605VO8ZSMGoc0lhKep5WOOJNPm/IWkIhGP X-QQ-GoodBg: 2 From: tangmeng To: libabigail@sourceware.org Subject: [PATCH v2] abicompat: Add prompt message for abnormal operation Date: Fri, 29 Oct 2021 17:23:43 +0800 Message-Id: <20211029092343.32219-1-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign5 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Cc: tangmeng Errors-To: libabigail-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libabigail" When using abicompat, if the user configures the lib2 path while using the xxx option, the configuration of lib2 is not actually processed in the command execution process, and there is no prompt message. It will cause lib2 to be considered to have been processed, so a warning is added here to prompt the user. * tools/abicompat.cc (main): Add warning tips for some actions (main): Remove extra spaces in the comment code Signed-off-by: tangmeng Signed-off-by: tangmeng Signed-off-by: Dodji Seketeli --- tools/abicompat.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/abicompat.cc b/tools/abicompat.cc index 60cd794f..989915f3 100644 --- a/tools/abicompat.cc +++ b/tools/abicompat.cc @@ -390,7 +390,7 @@ perform_compat_check_in_normal_mode(options& opts, return status; } -/// An description of a change of the type of a function. It contains +/// An description of a change of the type of a function. It contains /// the declaration of the function we are interested in, as well as /// the differences found in the type of that function. struct fn_change @@ -638,6 +638,13 @@ main(int argc, char* argv[]) return 0; } + if (opts.weak_mode && !opts.lib2_path.empty()) + { + emit_prefix(argv[0], cout) + << "WARNING: The \'--weak-mode\' option is used. The " + << opts.lib2_path << " will be ignored automatically\n"; + } + ABG_ASSERT(!opts.app_path.empty()); if (!abigail::tools_utils::check_file(opts.app_path, cerr, opts.prog_name)) return abigail::tools_utils::ABIDIFF_ERROR;