From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id C19153858C20 for ; Wed, 16 Feb 2022 15:27:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C19153858C20 From: Hans-Peter Nilsson To: Mike Frysinger CC: In-Reply-To: (message from Mike Frysinger on Wed, 16 Feb 2022 02:17:43 -0500) Subject: Re: [PATCH 04/12] sim/testsuite/cris/c: Use -sim3 but only for newlib targets MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT References: <20220214225824.AC90A20439@pchp3.se.axis.com> <20220214230255.DC76120439@pchp3.se.axis.com> <20220216060906.DAD422040B@pchp3.se.axis.com> Message-ID: <20220216152730.8552F20414@pchp3.se.axis.com> Date: Wed, 16 Feb 2022 16:27:30 +0100 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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 15:27:33 -0000 > Date: Wed, 16 Feb 2022 02:17:43 -0500 > From: Mike Frysinger > 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). > > > > > > this part isn't needed by design. every .exp file calls `sim_init` which in > > > turn calls `sim_init_toolchain` which fully initializes the toolchain for the > > > current file. so as soon as c.exp finishes running, whatever comes next is > > > going to reset the flags you saved. > > > > 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 Ok then, I'll remove those bits. brgds, H-P