From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by sourceware.org (Postfix) with ESMTPS id ED5B23858D38 for ; Tue, 20 Sep 2022 07:26:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED5B23858D38 X-IronPort-AV: E=McAfee;i="6500,9779,10475"; a="300440975" X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="300440975" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 00:26:41 -0700 X-IronPort-AV: E=Sophos;i="5.93,329,1654585200"; d="scan'208";a="621158625" Received: from labpcdell3650-003.iul.intel.com (HELO localhost) ([172.28.49.87]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 00:26:40 -0700 From: Nils-Christian Kempke To: gdb-patches@sourceware.org Cc: tom@tromey.com, Nils-Christian Kempke Subject: [PATCH 1/4] gdb, testsuite: handle icc and icpc deprecated remarks Date: Tue, 20 Sep 2022 09:26:26 +0200 Message-Id: <20220920072629.2736207-2-nils-christian.kempke@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920072629.2736207-1-nils-christian.kempke@intel.com> References: <20220920072629.2736207-1-nils-christian.kempke@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2022 07:26:44 -0000 Starting with icc/icpc version 2021.7.0 and higher both compilers emit a deprecation remark when used. E.g. >> icc --version icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended compiler moving forward. Please transition to use this compiler. Use '-diag-disable=10441' to disable this message. icc (ICC) 2021.7.0 20220713 Copyright (C) 1985-2022 Intel Corporation. All rights reserved. >> icpc --version icpc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is deprecated ... icpc (ICC) 2021.7.0 20220720 Copyright (C) 1985-2022 Intel Corporation. All rights reserved. As the testsuite compile fails when unexpected output by the compiler is seen this change in the compiler breaks all existing icc and icpc tests. This patch makes the gdb testsuite more forgiving by a) allowing the output of the remark when trying to figure out the compiler version and by b) adding '-diag-disable=10441' to the compile command whenever gdb_compile is called without the intention to detect the compiler. gdb/testsuite/ChangeLog: 2022-07-20 Nils-Christian Kempke * lib/gdb.exp: Handle icc/icpc deprecation warnings. Signed-off-by: Nils-Christian Kempke --- gdb/testsuite/lib/gdb.exp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 0f6bb20b49c..e6053d7dc4e 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4493,6 +4493,13 @@ proc gdb_compile {source dest type options} { } } + # Starting with 2021.7.0 (recognized as icc-20-21-7 by GDB) icc and icpc + # are marked as deprecated and both compilers emit the remark #10441. To + # let GDB still compile successfully, we disable these warnings here. + if {!$getting_compiler_info && [test_compiler_info {icc-20-21-[7-9]}]} { + lappend new_options "additional_flags=-diag-disable=10441" + } + # Treating .c input files as C++ is deprecated in Clang, so # explicitly force C++ language. if { !$getting_compiler_info @@ -4749,6 +4756,17 @@ proc gdb_compile {source dest type options} { # Prune uninteresting compiler (and linker) output. regsub "Creating library file: \[^\r\n\]*\[\r\n\]+" $result "" result + # Starting with 2021.7.0 icc and icpc are marked as deprecated and both + # compilers emit a remark #10441. To let GDB still compile successfully, + # we disable these warnings. When $getting_compiler_info is true however, + # we do not yet know the compiler (nor its version) and instead prune these + # lines from the compiler output to let the get_compiler_info pass. + if {$getting_compiler_info} { + regsub \ + "(icc|icpc): remark #10441: The Intel\\(R\\) C\\+\\+ Compiler Classic \\(ICC\\) is deprecated\[^\r\n\]*" \ + "$result" "" result + } + regsub "\[\r\n\]*$" "$result" "" result regsub "^\[\r\n\]*" "$result" "" result -- 2.25.1 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928