From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 From: Mike Frysinger To: Hans-Peter Nilsson Cc: gdb-patches@sourceware.org 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-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 16 Feb 2022 07:17:47 -0000 --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--