From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UPMaJFPrTGEuIgAAWB0awg (envelope-from ) for ; Thu, 23 Sep 2021 17:02:11 -0400 Received: by simark.ca (Postfix, from userid 112) id 8D9281EE25; Thu, 23 Sep 2021 17:02:11 -0400 (EDT) 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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 F36701EE14 for ; Thu, 23 Sep 2021 17:02:10 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AC449385842B for ; Thu, 23 Sep 2021 21:02:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC449385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1632430930; bh=GSbOGBBuMcRd7SKAxntiYfMSNSLzSAs4CStAfu7iU08=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=kcj3ZNVQxJ7L4ms8egFPV7r8WEgKVQpknFA75xLAwZCc9+KfXA+SuAuofUmveSltJ 6NRus70eeZhBklbT3mHkfSZVTlGPgR+lcY4fKjE/NeZGUWlanAlZlTPoHdKum3n6gH pvA7eoRQDK8en7O0S/Q9igyKJ87aNQpfyQ7iTZWM= Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 4CB543857C4F for ; Thu, 23 Sep 2021 21:01:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4CB543857C4F 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-out2.suse.de (Postfix) with ESMTPS id 8970A202F4; Thu, 23 Sep 2021 21:01:33 +0000 (UTC) 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 527E913EAD; Thu, 23 Sep 2021 21:01:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uHAWES3rTGG7IQAAMHmgww (envelope-from ); Thu, 23 Sep 2021 21:01:33 +0000 Subject: Re: [PATCH][gdb/testsuite] Support -fPIE/-fno-PIE/-pie/-no-pie in gdb_compile_rust To: Tom Tromey , Tom de Vries via Gdb-patches References: <20210922090715.GA6660@delia> <87a6k35fy0.fsf@tromey.com> Message-ID: <69991eee-62a8-633c-d39f-92b2eaf66f93@suse.de> Date: Thu, 23 Sep 2021 23:01:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <87a6k35fy0.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Tom de Vries via Gdb-patches Reply-To: Tom de Vries Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 9/23/21 8:01 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries via Gdb-patches writes: > > Tom> Fix this by translating the gcc options to rustc options in gdb_compile_rust, > Tom> similar to how that is done for ada in target_compile_ada_from_dir. > > Thanks for doing this. > > Tom> + global board > Tom> + set board [target_info name] > Tom> + set multilib_flags_orig [board_info $board multilib_flags] > Tom> + set multilib_flags "" > Tom> + foreach op $multilib_flags_orig { > > This iterates over the flags as if they are a list, but constructs the > new flags as if it is a string: > > Tom> + append multilib_flags " -C link-arg=$op" > > This could in principle cause some quoting issues, though in practice > this would only occur with relatively weird values. > > If that's a concern, a fix would be to use: > > set multilib_flags {} ;# this is more idiomatic, not critical > ... > lappend multilib_flags -C link-arg=$op > > > Other than this, this seems fine to me. Thanks for pointing this out, fixed and committed. Thanks, - Tom > Maybe even fine as-is, up to you. > > Tom >