From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gNvJKvcXDWKdOQAAWB0awg (envelope-from ) for ; Wed, 16 Feb 2022 10:27:51 -0500 Received: by simark.ca (Postfix, from userid 112) id AD0CE1F3C9; Wed, 16 Feb 2022 10:27:51 -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 41EA11EDF0 for ; Wed, 16 Feb 2022 10:27:51 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83A183857C6D for ; Wed, 16 Feb 2022 15:27:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 83A183857C6D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1645025270; bh=Yd45fVQOrRR+fQdZno2kgoCDSS4IcImQcXfaH67vqkU=; h=To:In-Reply-To:Subject:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=gmZDu/HCV3V6yi2d00kaOK3Kg18OJg8CHUmXTiQ8bJvmhNlH5c4vIWMthMynGdExi 3Jqxu3j16WdRXeGq1LO/V6OwezPuvjsqb32B0bqYP4s8cjc3oOlgQAv7VIv1intGrZ mR6rN11D88KhEE43EwiG3kFrG0uSG772uQ+AwFcA= 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 To: Mike Frysinger 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-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: Hans-Peter Nilsson via Gdb-patches Reply-To: Hans-Peter Nilsson Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > 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