From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2089.outbound.protection.outlook.com [40.107.244.89]) by sourceware.org (Postfix) with ESMTPS id 389933858C55 for ; Tue, 20 Sep 2022 14:16:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 389933858C55 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZRuQ2WX1IDKv6hjoo94G18oOHkau+a3XwZM7puDICfbSJdzp135zBX0mFpWhEo/gWuKWj+VwVMglt3ePyteKtbiSAiiNEEjtfUP1c3bMS5NJJ6bAsS7vRomzECV4x1VbuyZObilrMIXFkEjTR/r4GVBeLwYS3Hny1AUEKMQdEx3UZ2G6PJgq/Q1E1N7ho1b/Ok61CDctav+YZe0sAx/jzrfH8cuvriqmJ7FUqZmdm4JW3D7EPo9AvEnqLSZaw0Ove1MZWi8lhTNdyW6py72RZ3NXYMPX4m+VENuyyYsUwQNwi+T5Kj4LKPJZ7WMdItf31RaqxM1C5Hqm1mu1Sezsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7d3pLRtJYPnGBfQGg8DrjOy/LIuje5wTvGaQq4Sizfg=; b=j3MJ3DFuse5YHjM4h7v7FOdD0c4AQbMuHZv1MVqx2YMxoVn/vj3bwlGjux2LxRSDV6hNcBIPDEQ2Z5BoEHlE4/XyhH1K5bKseAcr0vNTYUuXU1cNGFcLkKKIDvt4nAi4ucFCXVRKbn1ALHTEW0eUvhyMC0izcWu5QQjC4IlHPPT8Zk/3MNqJ3zZeBSX7PPi7iPWSAc1fYGkAwjCNXll55UIl5dPgMwa4xbr+l0PRJNhCYz9icysccEgUhkx4oPQfn2asR+Bm9NgcNGHSyaOtsPFH0vtRmCxhslZdax+GVKJbHW179/C717hn1NqY8barsBQPSGdHe1NNkCr9fiiFIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none Received: from DM4PR12MB5745.namprd12.prod.outlook.com (2603:10b6:8:5c::7) by DM4PR12MB7696.namprd12.prod.outlook.com (2603:10b6:8:100::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.21; Tue, 20 Sep 2022 14:16:55 +0000 Received: from DM4PR12MB5745.namprd12.prod.outlook.com ([fe80::7df5:ab:9c6b:ac77]) by DM4PR12MB5745.namprd12.prod.outlook.com ([fe80::7df5:ab:9c6b:ac77%4]) with mapi id 15.20.5612.022; Tue, 20 Sep 2022 14:16:55 +0000 From: "Six, Lancelot" To: "gdb-patches@sourceware.org" CC: "lsix@lancelotsix.com" Subject: RE: [PATCH] gdb/testsuite/lib/future.exp: follow dejagnu default_target_compile Thread-Topic: [PATCH] gdb/testsuite/lib/future.exp: follow dejagnu default_target_compile Thread-Index: AQHYwVUGkiqDxJcM00+xgnd+uqfwna3odFaA Date: Tue, 20 Sep 2022 14:16:54 +0000 Message-ID: References: <20220905182616.621993-1-lancelot.six@amd.com> In-Reply-To: <20220905182616.621993-1-lancelot.six@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Enabled=true; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SetDate=2022-09-20T14:16:15Z; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Method=Privileged; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Name=Public-AIP 2.0; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ActionId=f49bc26b-3deb-4574-879f-f877db810eb1; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ContentBits=1 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_enabled: true msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_setdate: 2022-09-20T14:16:52Z msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_method: Privileged msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_name: Public-AIP 2.0 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_siteid: 3dd8961f-e488-4e60-8e11-a82d994e183d msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_actionid: 2c59726a-45e8-425b-8add-ecfac338c638 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_contentbits: 0 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR12MB5745:EE_|DM4PR12MB7696:EE_ x-ms-office365-filtering-correlation-id: 1485c0cd-b540-4cb9-e0f8-08da9b12c567 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +ViI9JLxY8wiCPgIa9bwL5VNwzVOUXVALORZ+/Fs/ue804lgd5ejeAQ1HpzUlDW3dHEDKIWplCpCIEa0sB3gLyVXOFYXfnZU8aVVw1cbpMoMlEtTDeWlEOrl8WEmRC9r9YQqwuwAWCOSqEImSj+NXzbSSDMlfr2jU925n1yNBiOnvdF0gWD9/ND6u0t9RuJPmr4Q+45CyzZnAYYmUqY4oOUZs38eC3FHCW5oRlvXrg6fJTiMqIX7RWhpz+cySL+TafB3rtAk8GEeNoWYN20Wp3HJwOybU4n39JBJpuXaPbPFU2G2O2DJUEY+k8VnT0bOLlrZyTjSmV7mMGuvStUu3KsdGt8PbjPEzTVCDCgvf7uROB7NKCleYSj/nmA4D3/8AsOaAuveGKqVQkEuo1JeZ78rrBzSiquYQNIczx2eSMdMm1HLayklB0COadgmOWgmzbWJB6mC/zpkagjvej2GlIVDA8fmr01iHGYrby3tmZnuWxz3AOvkR8uk1iq05hhXS1JCReEOkzPW0DKxDXdYVjoc125dugKxwHb3bi3x02M3RPB0kNEcKuh/S+XQTeWOAAWvyGbhHbG1m7iHen73jfMBfkWrgAQv3C18bq72AJm3/n5jUU3RxPTpbNRUN5/V07zoXF7xvpU0QkwDyQEQ591/MDAffM0fM4HAoCogeeLdJ9bmi4fpCm4ies6nkeB5PEfzQIT6xnlDHrkHt5IKtJf6A7rCAQDiyBMEUbd2m35UXKXwNfhwe4VvSmOUSAVlGyY7IxNWlcr5KjnmUTV1GhWIPhLzdb1rCKLC7BcYZUE= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5745.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(346002)(39860400002)(396003)(136003)(376002)(451199015)(478600001)(186003)(41300700001)(66446008)(2906002)(38100700002)(71200400001)(316002)(966005)(38070700005)(76116006)(4326008)(66946007)(6916009)(33656002)(66476007)(6506007)(55016003)(53546011)(7696005)(9686003)(64756008)(26005)(66556008)(8676002)(5660300002)(83380400001)(122000001)(8936002)(52536014)(86362001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?boAMbjK2uqL6P6PLDtU5e2WDn/rLCLVCQ/1971VFHLFpfMF6TfuQ22jm+A/1?= =?us-ascii?Q?OsDAG3pTqvOvUM9fFhZl+bEcACZxyNkj+DHLdYNGuadSj2KugbJvn0N9zXmb?= =?us-ascii?Q?qwyd2+0maeUrvFH70xKwbmPzjsWnRqsSUNzKXMeR+44VMW+0cMua+BuzupyL?= =?us-ascii?Q?wgW86tqBHgpg2aUycK4LffADl9x6Y6etocKFNS7WO+Blgoj8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/LaVek2Ep7l9+FoNqg0rmGvURNhrNXUMTyX61AebWFoYmsFXjW?= =?us-ascii?Q?b22crHSkqM3OJT6MfJbYndzdqGEM5S9+InWCS5bHmzEjf7aGfq0kx80nPa+s?= =?us-ascii?Q?POtyEpXDvru3Cwp2d8Gvv9aHaAxi2gGTEVy/4AlS0QVkmhHKwt7KjQZ9ChkL?= =?us-ascii?Q?DjwNHlqCGFIugPTaksYaC/BXVVrbvk+LQLXo8LX/1e5+pPOJNJLTjYAbO7sC?= =?us-ascii?Q?80a//9pp8rfWeBZlfJ1mKmK13nTYkHmxXO4gvHnAhzdwavSAjFmSAudh02/X?= =?us-ascii?Q?Zf6eZ/cmRVHg5dgGGHT2lpZ1sLSKheZ1v0VGesl/8FNqn1wOJF0jiBPlGfSI?= =?us-ascii?Q?jvR8RxyG9YT/5sVgPPnYn+drE7bEy3oG7DWItHWdquOqNcQbODxb9kHSGJgC?= =?us-ascii?Q?qfgXO9en15QSb49UALJFgiNBlVoREKZXo0Ylqih/r+/rcpxruP+op1YeS+Ky?= =?us-ascii?Q?MAh+qcI8D+uLaPpoHtE=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5745.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1485c0cd-b540-4cb9-e0f8-08da9b12c567 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Sep 2022 14:16:54.9669 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: rQM6IX55yv3yWCQnCY52nFnYZnIiV5ox+DExb6CMx5n4S5pVYZQtr+hjx+VpyBcfGywG97u88sKxlsyzTr2Ahg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7696 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, 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 14:17:01 -0000 [Public] Hi, Kindly pinging. Best, Lancelot. > -----Original Message----- > From: Six, Lancelot > Sent: 05 September 2022 19:26 > To: gdb-patches@sourceware.org > Cc: lsix@lancelotsix.com; Six, Lancelot > Subject: [PATCH] gdb/testsuite/lib/future.exp: follow dejagnu > default_target_compile >=20 > GDB's testsuite can override dejagnu's default_target_compile if the > system provided dejagnu installation does not provide support to compile > languages GDB needs. >=20 > Recent version of dejagnu (1.6.3, installed on REHL-9) includes ba60272 > "Establish a default C compiler by evaluating [find_gcc] if no other > compiler is given."[1]. This commit removed calls such as > `set_board_info compiler "[find_gcc]"` from the various baseboards > and has default_target_compile call `find_gcc` itself to find a compiler > if none was specified by the board description. >=20 > On systems with dejagnu-1.6.3, if GDB's overrides is needed to support > languages still unknown to dejagnu, we end up in the following > situation: > - The system board files do not set the C compiler anymore, > - GDB's replacement for default_target_compile assumes that the > compiler should have been set up by the board file. >=20 > In this situation, no one sets the C compiler for the board and as a > result many test are not compiled and not executed: >=20 > [...] > Running .../gdb/testsuite/gdb.base/bt-on-error-and-warning.exp ... > gdb compile failed, default_target_compile: No compiler to compile wi= th > Running .../gdb/testsuite/gdb.base/dprintf-non-stop.exp ... > gdb compile failed, default_target_compile: No compiler to compile wi= th > Running .../gdb/testsuite/gdb.base/structs3.exp ... > gdb compile failed, default_target_compile: No compiler to compile wi= th > [...] >=20 > We are observing this error with ROCgdb[2], a downstream port of GDB > supporting AMD GPUs. This port needs to use GDB's override of > default_target_compile to compile HIP programs since dejagnu does not > provide support for this language yet. >=20 > This patch changes gdb_default_target_compile_1 in a similar way > default_target_compile has been updated so both implementations remain > compatible. Even if this is not strictly required by GDB just yet, > I believe keeping both implementations in sync desirable. >=20 > Using board files provided with dejagnu <=3D1.6.2 is still supported: if > the compiler is set by the board file, gdb_default_target_compile_1 uses > it and does not need `find_gcc`. >=20 > Patch tested on x86_64 REHL-9 and ubuntu-20.04 on top of GDB and > ROCgdb. >=20 > [1] > http://git.savannah.gnu.org/gitweb/?p=3Ddejagnu.git;a=3Dcommit;h=3Dba6027= 2a5a > c6f6a7012acca03f596a6ed003f044 > [2] https://github.com/ROCm-Developer-Tools/ROCgdb >=20 > Change-Id: Ibff52684d9cab8243a7c6748ecbd29f50c37e669 > --- > gdb/testsuite/lib/future.exp | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp > index 36dd611d61c..17736ed360a 100644 > --- a/gdb/testsuite/lib/future.exp > +++ b/gdb/testsuite/lib/future.exp > @@ -403,7 +403,11 @@ proc gdb_default_target_compile_1 {source destfile > type options} { > } >=20 > if { $compiler =3D=3D "" } { > - set compiler [board_info $dest compiler] > + if { [board_info $dest exists compiler] } { > + set compiler [board_info $dest compiler] > + } elseif { $compiler_type eq "c" } { > + set compiler [find_gcc] > + } > if { $compiler =3D=3D "" } { > return "default_target_compile: No compiler to compile with" > } >=20 > base-commit: b9593cb70533f28d276ab8d582dfe622aa4591d5 > -- > 2.25.1