From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id BD043385840D for ; Sat, 19 Nov 2022 06:42:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BD043385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E4DE422E05; Sat, 19 Nov 2022 06:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668840155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eMDSBlq1AoYz4HQidYbw0s7udefhQXe8zDOOIez4Xno=; b=l7MdAZamyI+RmUYM6GrdZj2HxlT3y4Q2pdNy7QB5PGysqOI6rB8gVBJ9aMSBw4mC1hlVjf u30zHkQgwz9LFtcckSAG9XvKNIQJs0K0ck+mZQ0xErrUkc8pePtRj39aTJfCQgoA0ZAmsg fW8bGOr++EydaDnERRoC82jCWUIcV40= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668840155; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eMDSBlq1AoYz4HQidYbw0s7udefhQXe8zDOOIez4Xno=; b=SZPpBfpuCFiS6JiLdZTWPokl5bvpYhC3D8MaeemIXZCiy0cjg8vhzSpZ88R7ibSH9qhE0z flcHpoLwdETgYECA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8EAEA1377F; Sat, 19 Nov 2022 06:42:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1XxYH9t6eGO1WQAAMHmgww (envelope-from ); Sat, 19 Nov 2022 06:42:35 +0000 Message-ID: Date: Sat, 19 Nov 2022 07:42:35 +0100 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] PowerPC, fix gdb.base/retval-large-struct.exp Content-Language: en-US To: Carl Love , Ulrich Weigand , "gdb-patches@sourceware.org" Cc: "will_schmidt@vnet.ibm.com" References: <71926c391f43cee2051ea0c9b449ec0aecc847ec.camel@us.ibm.com> <0eff963d-4633-7bdf-39be-003b1671432e@suse.de> <82e43627f7a2a2e06a5fc79db1fae17eb01c12e4.camel@us.ibm.com> From: Tom de Vries In-Reply-To: <82e43627f7a2a2e06a5fc79db1fae17eb01c12e4.camel@us.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/18/22 20:11, Carl Love wrote: > Tom: > > On Fri, 2022-11-18 at 17:25 +0100, Tom de Vries wrote: >> On 11/18/22 17:04, Ulrich Weigand wrote: >>> Tom de Vries wrote: >>> >>>> AFAIU, needing -fvar-tracking is specific to powerpc, so we >>>> should limit >>>> it's impact to that target. >>>> >>>> And it's a gcc compiler flag, so perhaps we should limit it's >>>> impact to >>>> that as well. >>> >>> No, it's not really powerpc specific - the same mechanism can be >>> used on many other platforms with an ABI that uses a return buffer >>> address that is not preserved. (E.g. we're currently looking into >>> enabling it on s390x.) >>> >> >> Right, so we can add those archs to the list of archs requiring >> -fvar-tracking support when gcc is used. >> >>> And given that the flag is harmless if it's available (which the >>> test verifies), I think it makes sense to just always enable it. >>> >> >> That's fine by me. >> >> Then I get: >> ... >> set flags {} >> >> lappend flags debug >> >> if { [have_fvar_tracking] } { >> lappend flags -fvar-tracking >> } else { >> if { ( [istarget powerpc*-*-*] || [istarget s390x*-*-* ]) >> && [is_c_compiler_gcc] } { >> unsupported "gcc used, -fvar-tracking needed" >> return -1 >> } >> } >> >> if {[prepare_for_testing "failed to prepare" $testfile $srcfile >> $flags]} { >> return -1 >> } > > The [have_fvar_tracking] does a runtime test to see if the compiler > supports the -fvar-tracking option. So if it passes, then the option > is supported. Agreed. > The test makes the additional check [istarget powerpc*- > *-*] || [istarget s390x*-*-* ]) && [is_c_compiler_gcc] redundant. > My concern is older gcc compilers that do not support -fvar-tracking. Those have no chance of succeeding, so we should bail out for those. OTOH, non-gcc compilers may or may not provide sufficient debug information, so there's no need to bail out for those. Thanks, - Tom > I don't think there is any need for the additional checks. > > Carl >