Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: dje@google.com (Doug Evans)
To: gdb-patches@sourceware.org
Subject: [patch] Allow for libc containing libpthread in testsuite.
Date: Mon, 01 Mar 2010 22:46:00 -0000	[thread overview]
Message-ID: <20100301224612.9EBE084842@ruffy.mtv.corp.google.com> (raw)

Hi.

The libc for Android doesn't have libpthread, pthread functions live in libc.
This patch to gdb_compile_pthreads adds support for this.

For targets without any threading support this will slow things down
a bit in that one extra compile is done before the testsuite will conclude
that threading isn't supported.
I *could* add an istarget check,
but in the interests of avoiding such things I went with this.
It won't slow down targets with threads as I added "" to the end.
[Which raises the question: I wonder what kind of speed-up can be had
by moving -lpthread ahead of -lpthreads. It will improve the
S/N ratio of gdb.log on linux at least.]

I will check this in in a few days if there are no objections.

2010-03-01  Doug Evans  <dje@google.com>

	* lib/gdb.exp (gdb_compile_pthreads): Handle case where
	libc contains libpthread.

Index: testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.139
diff -u -p -r1.139 gdb.exp
--- testsuite/lib/gdb.exp	24 Feb 2010 11:11:17 -0000	1.139
+++ testsuite/lib/gdb.exp	1 Mar 2010 22:26:05 -0000
@@ -1929,7 +1929,7 @@ proc gdb_compile {source dest type optio
 proc gdb_compile_pthreads {source dest type options} {
     set built_binfile 0
     set why_msg "unrecognized error"
-    foreach lib {-lpthreads -lpthread -lthread} {
+    foreach lib {-lpthreads -lpthread -lthread ""} {
         # This kind of wipes out whatever libs the caller may have
         # set.  Or maybe theirs will override ours.  How infelicitous.
         set options_with_lib [concat $options [list libs=$lib quiet]]


             reply	other threads:[~2010-03-01 22:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 22:46 Doug Evans [this message]
2010-03-02  5:06 ` Joel Brobecker
2010-03-02  9:00 ` Mark Kettenis

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=20100301224612.9EBE084842@ruffy.mtv.corp.google.com \
    --to=dje@google.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