From: Tom Tromey <tom@tromey.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tom@tromey.com>
Subject: Re: [PATCH][gdb/testsuite] Support -fPIE/-fno-PIE/-pie/-no-pie in gdb_compile_rust
Date: Thu, 23 Sep 2021 12:01:43 -0600 [thread overview]
Message-ID: <87a6k35fy0.fsf@tromey.com> (raw)
In-Reply-To: <20210922090715.GA6660@delia> (Tom de Vries via Gdb-patches's message of "Wed, 22 Sep 2021 11:07:20 +0200")
>>>>> "Tom" == Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> 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.
Maybe even fine as-is, up to you.
Tom
next prev parent reply other threads:[~2021-09-23 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 9:07 Tom de Vries via Gdb-patches
2021-09-23 18:01 ` Tom Tromey [this message]
2021-09-23 21:01 ` Tom de Vries via Gdb-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a6k35fy0.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox