From: Pedro Alves <palves@redhat.com>
To: gnutoolchain-gerrit@osci.io, gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@polymtl.ca>,
Tom Tromey <tromey@sourceware.org>
Subject: Re: [review] Add gdb_compile_openmp to lib/gdb.exp
Date: Fri, 08 Nov 2019 15:06:00 -0000 [thread overview]
Message-ID: <93a8a303-2ff3-08a6-d736-28108c6b78f6@redhat.com> (raw)
In-Reply-To: <20191106230528.5EA0525B28@gnutoolchain-gerrit.osci.io>
On 11/6/19 11:05 PM, Kevin Buettner (Code Review) wrote:
> For "pthreads", I think that we want to call gdb_compile when
> making the .o files and gdb_compile_pthreads when making the executable.
> If I make the change that you propose, then gdb_compile_pthreads is used
> for both executables and objects.
I suppose we could have different $func-like variables for compiling
and linking.
> I can still make this change if you want; but if I do this, I think that
> I should also add some code to gdb_compile_pthreads so that it will
> call gdb_compile (and also avoid printing the PASS message) when
> $type is not "executable".
Hmm, yes, pedantically we're supposed to compile .o files with -pthread also,
not just when linking, as it may enable predefined #defines that are necessary
for correct use of threads, like _REENTRANT, which used to be important for
glibc, though it isn't nowadays, I believe.
On a side note, it seems to me that better than calling gdb_compile_pthreads
repeatedly, it'd be better if we called a gdb_caching_proc that probed which
variant of -pthread, -lpthread, etc. is necessary and returned it, so that
build_executable_from_specs would just append the option to the set of options.
That would make gdb_compile_shlib_pthreads unnecessary, for example. In general
these gdb_compile_foo functions been like a worse idea than options to me, since
they don't allow combinations.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2019-11-08 15:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-04 4:26 Kevin Buettner (Code Review)
2019-11-05 15:27 ` Tom Tromey (Code Review)
2019-11-06 0:33 ` Pedro Alves (Code Review)
2019-11-06 16:09 ` Simon Marchi (Code Review)
2019-11-06 16:19 ` Pedro Alves (Code Review)
2019-11-06 16:24 ` Pedro Alves (Code Review)
2019-11-06 16:26 ` Simon Marchi
2019-11-06 16:31 ` Pedro Alves
2019-11-06 16:28 ` Simon Marchi
2019-11-06 16:29 ` Simon Marchi (Code Review)
2019-11-06 23:05 ` Kevin Buettner (Code Review)
2019-11-08 15:06 ` Pedro Alves [this message]
2019-11-06 23:14 ` Kevin Buettner (Code Review)
2019-11-09 20:59 ` [review v2] " Kevin Buettner (Code Review)
2019-12-03 16:41 ` Pedro Alves (Code Review)
2019-12-10 22:46 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2019-12-10 22:46 ` Sourceware to Gerrit sync (Code Review)
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=93a8a303-2ff3-08a6-d736-28108c6b78f6@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=gnutoolchain-gerrit@osci.io \
--cc=simon.marchi@polymtl.ca \
--cc=tromey@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