* [patch] Allow for libc containing libpthread in testsuite.
@ 2010-03-01 22:46 Doug Evans
2010-03-02 5:06 ` Joel Brobecker
2010-03-02 9:00 ` Mark Kettenis
0 siblings, 2 replies; 3+ messages in thread
From: Doug Evans @ 2010-03-01 22:46 UTC (permalink / raw)
To: gdb-patches
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]]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Allow for libc containing libpthread in testsuite.
2010-03-01 22:46 [patch] Allow for libc containing libpthread in testsuite Doug Evans
@ 2010-03-02 5:06 ` Joel Brobecker
2010-03-02 9:00 ` Mark Kettenis
1 sibling, 0 replies; 3+ messages in thread
From: Joel Brobecker @ 2010-03-02 5:06 UTC (permalink / raw)
To: Doug Evans; +Cc: gdb-patches
> 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.
I think this is fine. Given the modest number of tests that involve
threading, and their overal size, I don't think an extra link will
slow the testsuite down noticeably...
--
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch] Allow for libc containing libpthread in testsuite.
2010-03-01 22:46 [patch] Allow for libc containing libpthread in testsuite Doug Evans
2010-03-02 5:06 ` Joel Brobecker
@ 2010-03-02 9:00 ` Mark Kettenis
1 sibling, 0 replies; 3+ messages in thread
From: Mark Kettenis @ 2010-03-02 9:00 UTC (permalink / raw)
To: dje; +Cc: gdb-patches
> Date: Mon, 1 Mar 2010 14:46:12 -0800 (PST)
> From: dje@google.com (Doug Evans)
>
> Hi.
>
> The libc for Android doesn't have libpthread, pthread functions live in libc.
> This patch to gdb_compile_pthreads adds support for this.
Sigh, why has Android to be different *again*. You guys should really
just add a dummy (static) libpthread. Will save people a lot of pain.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-03-02 9:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-01 22:46 [patch] Allow for libc containing libpthread in testsuite Doug Evans
2010-03-02 5:06 ` Joel Brobecker
2010-03-02 9:00 ` Mark Kettenis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox