This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix TLS access for -static -pthread
- From: Sergio Durigan Junior <sergiodj at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Fri, 06 Jun 2014 02:34:17 -0300
- Subject: Re: [patch] Fix TLS access for -static -pthread
- Authentication-results: sourceware.org; auth=none
- References: <20140410115204 dot GB16411 at host2 dot jankratochvil dot net> <539018F9 dot 5060307 at codesourcery dot com> <20140605080639 dot GA32146 at host2 dot jankratochvil dot net>
On Thursday, June 05 2014, Jan Kratochvil wrote:
>> Is it good to you? b.t.w, this case is UNSUPPORTED on FC 20, because
>> staticthreads.c can't be compiled. I guess this case requires
>> some recent version of glibc.
>
> I do not see any unsupported case on
> * Fedora 20 x86_64 updates-testing disabled with debuginfos
> * Fedora 20 x86_64 updates-testing enabled with debuginfos
> * Fedora 20 x86_64 updates-testing enabled without debuginfos
> * Fedora Rawhide x86_64 with debuginfos
> for both nat and gdbserver runs.
>
> Sergio said he saw some problem with mktemp symbol on some Fedora but I do not
> have that reproducible so I cannot fix it.
I saw this:
Executing on host: gcc ../../../gdb/testsuite/gdb.threads/staticthreads.c -static -DHAVE_TLS -g -lpthread -lm -o /patch/to/gdb/testsuite/gdb.threads/staticthreads (timeout = 300)
spawn -ignore SIGHUP gcc ../../../gdb/testsuite/gdb.threads/staticthreads.c -static -DHAVE_TLS -g -lpthread -lm -o /patch/to/gdb/testsuite/gdb.threads/staticthreads^M
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o): In function `sem_open':^M
(.text+0x774d): warning: the use of `mktemp' is dangerous, better use `mkstemp'^M
output is:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../lib64/libpthread.a(libpthread.o): In function `sem_open':^M
(.text+0x774d): warning: the use of `mktemp' is dangerous, better use `mkstemp'^M
This is on RHEL-6.5, with gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4).
I had to do a small workaround in gdb_compile_pthreads (from
testsuite/lib/gdb.exp) in order to make the compilation succeed.
--
Sergio
GPG key ID: 65FC5E36
Please send encrypted e-mail if possible
http://blog.sergiodj.net/