From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QI6WOcGMLGOTVD4AWB0awg (envelope-from ) for ; Thu, 22 Sep 2022 12:26:41 -0400 Received: by simark.ca (Postfix, from userid 112) id DDFA11E11A; Thu, 22 Sep 2022 12:26:41 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Z5DHOV2y; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E4C751E110 for ; Thu, 22 Sep 2022 12:26:40 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CBBD53857C6F for ; Thu, 22 Sep 2022 16:26:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CBBD53857C6F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663863999; bh=cxJGrvOiDebKDDCQWk/ELtgxiBUZjgcU1haufZNTnp4=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Z5DHOV2y88FbgSKW5LybEC5qdWfe+P8hfyHqae4GMCIPeNhUMuea9uN3S+nE/wmMV Efb91SJFFhA4CPxZlMJzycKiglNDoj26V7NVYlMkdcO4TD4GsBtBmYRsqnDX0ojpkj c5z0rvKYX089okFlADO/xC3LCxpC//Nmn0f8pBpE= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0035938582AE for ; Thu, 22 Sep 2022 16:26:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0035938582AE Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 51DE31E0D5; Thu, 22 Sep 2022 12:26:17 -0400 (EDT) Message-ID: Date: Thu, 22 Sep 2022 12:26:15 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] gdb/testsuite/lib/future.exp: follow dejagnu default_target_compile Content-Language: en-US To: Lancelot SIX , gdb-patches@sourceware.org References: <20220905182616.621993-1-lancelot.six@amd.com> In-Reply-To: <20220905182616.621993-1-lancelot.six@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Cc: lsix@lancelotsix.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-09-05 14:26, Lancelot SIX via Gdb-patches wrote: > 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. > > 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. > > 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. > > In this situation, no one sets the C compiler for the board and as a > result many test are not compiled and not executed: > > [...] > Running .../gdb/testsuite/gdb.base/bt-on-error-and-warning.exp ... > gdb compile failed, default_target_compile: No compiler to compile with > Running .../gdb/testsuite/gdb.base/dprintf-non-stop.exp ... > gdb compile failed, default_target_compile: No compiler to compile with > Running .../gdb/testsuite/gdb.base/structs3.exp ... > gdb compile failed, default_target_compile: No compiler to compile with > [...] > > 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. > > 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. > > Using board files provided with dejagnu <=1.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`. > > Patch tested on x86_64 REHL-9 and ubuntu-20.04 on top of GDB and ROCgdb. > > [1] http://git.savannah.gnu.org/gitweb/?p=dejagnu.git;a=commit;h=ba60272a5ac6f6a7012acca03f596a6ed003f044 > [2] https://github.com/ROCm-Developer-Tools/ROCgdb Thanks, this is ok. OOC, does this mean we can remove the "find_gcc" calls in our own boards? The override in future.exp does not systematically get used when running on a system with an older DejaGNU, so I would guess not. Simon