From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qegqG0OlDGJOKAAAWB0awg (envelope-from ) for ; Wed, 16 Feb 2022 02:18:27 -0500 Received: by simark.ca (Postfix, from userid 112) id 5D2FD1F3C9; Wed, 16 Feb 2022 02:18:27 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 E8E791F0BB for ; Wed, 16 Feb 2022 02:18:26 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7B2593857C41 for ; Wed, 16 Feb 2022 07:18:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B2593857C41 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644995906; bh=0gQzlkeLxhhIUCjgsV/g/LbV3slhTowYbK3/9TLNaj4=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=I6m0pMQP33VupsGCh1bwTx9ZFQ07he22p1ApeLvrNXmd+Jx6dq+Z6mGFZaex7/s+a JkKpY7Rerc1R6bUfVLJMCH1nZjsCY4fTptrNoQPXL11UggxlHReZ+GxIRZFt2zj2DC lrWUZwBuytFHGK/BjLZZhgkeEK5xur3s02c+RlA4= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id E9C65385803D for ; Wed, 16 Feb 2022 07:17:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E9C65385803D Received: by smtp.gentoo.org (Postfix, from userid 559) id 891A83432D6; Wed, 16 Feb 2022 07:17:45 +0000 (UTC) Date: Wed, 16 Feb 2022 02:17:43 -0500 To: Hans-Peter Nilsson Subject: Re: [PATCH 04/12] sim/testsuite/cris/c: Use -sim3 but only for newlib targets Message-ID: Mail-Followup-To: Hans-Peter Nilsson , gdb-patches@sourceware.org References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214230255.DC76120439@pchp3.se.axis.com> <20220216060906.DAD422040B@pchp3.se.axis.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LQEyuysqFJOEKPEd" Content-Disposition: inline In-Reply-To: <20220216060906.DAD422040B@pchp3.se.axis.com> 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: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" --LQEyuysqFJOEKPEd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 16 Feb 2022 07:09, Hans-Peter Nilsson wrote: > Date: Wed, 16 Feb 2022 00:39:09 -0500 Mike Frysinger > > On 15 Feb 2022 00:02, Hans-Peter Nilsson via Gdb-patches wrote: > > > But, save and restore CFLAGS_FOR_TARGET around the modification and > > > use where needed, to not have the CRIS-specific modification affect a > > > continuing test-run (possibly for other targets). > >=20 > > this part isn't needed by design. every .exp file calls `sim_init` whi= ch in > > turn calls `sim_init_toolchain` which fully initializes the toolchain f= or the > > current file. so as soon as c.exp finishes running, whatever comes nex= t is > > going to reset the flags you saved. >=20 > I know, I just didn't want to rely on that being the case. i'm saying that the behavior isn't an accident. it's designed this way. hence you aren't relying on incidental behavior, you're using the API as intended. i explicitly went through and stripped out the save/restore logic from the tests because it was already inconsistently implemented. this way it's guaranteed to be consistent, and we don't need boilerplate. -mike --LQEyuysqFJOEKPEd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIMpRcACgkQQWM7n+g3 9YE15BAAzmzaFPmz7xp3zb7LxYnl0I6UOKofQ0ioweuVs/Gj16fE+suoX2azsL7U 20Eef9IA39t5ePV38h7nIy4RmX2SwSS883sf20jv8xQQxUwUMZ38cP13DBuUCKez S7QsLH8xSLxAdqCCWBeoiAkOTalTaoRsyjLDKqEQudAj9/tZHyWcjtWk8ak6tTow zLg98YGwRQ5gqBu/ijeORP5lAU3i6jW2JJgWGH3jCrLJrgTRXB6lhDnX4NciYzO+ /OBwzy2qmhaOP5z1SBrvZspRExHQZgeNQfL6CTRsQ/oy6Ll+Kyh8scrSxyy0uxQz R6W1VnygcqfkNEOpDqyhVygP1htjV7FJngdj9tx1KeX70kf0QWUauz2+UqCa6722 ZPi6D49pKKUNg47pZtw0KJdPEmLcv1DDhcbVdy6p2lyDVhqcqm1MUsSTp+FS1HcR vC90xt+ph+rIER2dM9dZbRdWq6p3Rxy4xDcAOXIIgnAmoYnqIvfEhHUfjOBDkjDG Sa0mZKUGpg8p3Sg7ZubhlLdNGyatmnt5iQtidy3zNc7sW0+KXA/irfruucTP4X10 fgQvfMmWTx/N8awXbp4kjHAPvqjeTl0YUK82RhqbHHt4S55Ls8TUCtQ3OXj6B4Bu zCULvbGwco9YdBYIW/zp9QpvtoIIUVlVsf6f6ney2Cig6pNF4Co= =WIRK -----END PGP SIGNATURE----- --LQEyuysqFJOEKPEd--