From patchwork Fri Oct 29 08:58:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tangmeng X-Patchwork-Id: 46778 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 D8BA5385743F for ; Fri, 29 Oct 2021 08:58:49 +0000 (GMT) X-Original-To: libabigail@sourceware.org Delivered-To: libabigail@sourceware.org Received: from smtpbguseast2.qq.com (smtpbguseast2.qq.com [54.204.34.130]) by sourceware.org (Postfix) with ESMTPS id 3FC65385843F for ; Fri, 29 Oct 2021 08:58:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3FC65385843F 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: bizesmtp50t1635497917t74qvg03 Received: from localhost.localdomain (unknown [58.240.82.166]) by esmtp6.qq.com (ESMTP) with id ; Fri, 29 Oct 2021 16:58:32 +0800 (CST) X-QQ-SSF: 0140000000200020C000000A0000000 X-QQ-FEAT: 0VgNaGdhy9gNu5BIRvPcOf60PV/6CxYfBYaUrDkfaxuIxgih0XFBX9v6y1zDg qFGySWOUl3/ZyZG5db8vi0r7TRTA95MqnAWYEgMDzanSh6XPTEXQRLNqiIqh6s1ejEugEyv f+6UmJRsmgFA5lj+5cDtyXN+YhlUQR/VUkD6NeJxf9qNx1DJXNdvYstLz0ZTbiqJdPefvdc +6nOwP5cC+iM6UrmDjJm8BseZZzCW4TB+2nhX4RBt7xRvpHBG0ceMSlh2jy1MAQu5XOlmUl zCjDUATFSE1CG8ao7ykoFx8dYc/K/s5Htqm9X6zNNg6uek90uveooBsGZP/iKyE3RI+BD5f N3rloQjTpNbHtyTHCMfVPdV7nxeNIINOTbcPflV X-QQ-GoodBg: 2 From: tangmeng To: libabigail@sourceware.org Subject: [PATCH] abicompat: Add prompt message for abnormal operation Date: Fri, 29 Oct 2021 16:58:30 +0800 Message-Id: <20211029085830.30810-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.5 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 Signed-off-by: tangmeng --- 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 not 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;