From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 2E3183858D32 for ; Wed, 15 Jun 2022 16:21:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E3183858D32 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25FF6Fcr020413 for ; Wed, 15 Jun 2022 16:21:35 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3gq8e52984-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jun 2022 16:21:35 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 25FG5MUf002265 for ; Wed, 15 Jun 2022 16:21:34 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma03dal.us.ibm.com with ESMTP id 3gmjpa35y4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 15 Jun 2022 16:21:34 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 25FGLXlU19530080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Jun 2022 16:21:33 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85540AE064; Wed, 15 Jun 2022 16:21:33 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 08D18AE05C; Wed, 15 Jun 2022 16:21:33 +0000 (GMT) Received: from li-e362e14c-2378-11b2-a85c-87d605f3c641.ibm.com (unknown [9.211.68.56]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 15 Jun 2022 16:21:32 +0000 (GMT) Message-ID: Subject: [PATCH] Fix gdb.base/step-indirect-call-thunk.exp From: Carl Love To: gdb-patches@sourceware.org, will schmidt , cel@us.ibm.com, Ulrich Weigand Date: Wed, 15 Jun 2022 09:21:32 -0700 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-18.el8) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: NWbXnZTjNDrFdPydsmr6KcTFybqAonhP X-Proofpoint-GUID: NWbXnZTjNDrFdPydsmr6KcTFybqAonhP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.874,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-15_14,2022-06-15_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=999 spamscore=0 adultscore=0 impostorscore=0 phishscore=0 clxscore=1015 mlxscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2206150061 X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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: Wed, 15 Jun 2022 16:21:38 -0000 GDB maintainers: The gdb regression test gdb.base/step-indirect-call-thunk.exp currently does not run on X86 due to a compile error related to incompatible gcc command line argument. Secondly, the gcc command line arguments that are used are specific to Intel thus generating an unsupported command line error when compiled on other architectures. This patch fixes the command line arguments so the test will compile on X86. It also adds a check so the test will only run on X86. Please let me know if this patch is acceptable for mainline. Carl Love -------------------------------------------------------------- Fix gdb.base/step-indirect-call-thunk.exp This test fails on Intel X86-64 with the error: Executing on host: gcc -fno-stack-protector -fdiagnostics-color=never -mindirect-branch=thunk -mfunction-return=thunk -c -g -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step-indirect-call-thunk0.o /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector -fdiagnostics-color=never -mindirect-branch=thunk -mfunction-return=thunk -c -g -o /.../gdb/testsuite/outputs/gdb.base/step-indirect-call-thunk/step-indirect-call-thunk0.o /.../binutils-gdb-current/gdb/testsuite/gdb.base/step-indirect-call-thunk.c /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c: In function 'inc': /.../gdb/testsuite/gdb.base/step-indirect-call-thunk.c: 22:1: error: '-mindirect-branch' and '-fcf-protection' are not compatible 22 | { /* inc.1 */ As stated in the error message the default "-fcf-protection" and "-mindirect-branch' are in compatible. The fcf-protection argument needs to be "-fcf-protection=none" for the test to compile on Intel. The test also fails on PowerPC as the "-mindirect-branch' is an Intel specific GCC command line argument. A check for X86 is added so the test will only run on X86 platforms. The patch has been tested and verified on Power 10 and Intel X86-64 systems with no regressions. --- gdb/testsuite/gdb.base/step-indirect-call-thunk.exp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp index 761e1d9a280..7c1b53c99be 100644 --- a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp +++ b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp @@ -15,7 +15,11 @@ standard_testfile -set cflags "-mindirect-branch=thunk -mfunction-return=thunk" +if { ![istarget "x86*"] } { + return +} + +set cflags "-mindirect-branch=thunk -mfunction-return=thunk -fcf-protection=none" if { [prepare_for_testing "failed to prepare" $testfile $srcfile \ [list debug "additional_flags=$cflags"]] } { return -1 -- 2.31.1