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: Yao Qi <yao at codesourcery dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Date: Fri, 6 Jun 2014 10:34:07 +0800
- 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 06/05/2014 04:06 PM, Jan Kratochvil wrote:
> 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.
My machine is Fedora 20 x86, and staticthreads.c can't be compiled
like this:
Executing on host: gcc
../../../../git/gdb/testsuite/gdb.threads/staticthreads.c -static
-DHAVE_TLS -g -lpthread -lm -o
/home/yao/Source/gnu/gdb/build-git/x86/gdb/testsuite/gdb.threads/staticthreads
(timeout = 300)
spawn -ignore SIGHUP gcc
../../../../git/gdb/testsuite/gdb.threads/staticthreads.c -static
-DHAVE_TLS -g -lpthread -lm -o
/home/yao/Source/gnu/gdb/build-git/x86/gdb/testsuite/gdb.threads/staticthreads^M
/usr/bin/ld: cannot find -lpthread^M
/usr/bin/ld: cannot find -lm^M
/usr/bin/ld: cannot find -lc^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1
output is:
/usr/bin/ld: cannot find -lpthread^M
/usr/bin/ld: cannot find -lm^M
/usr/bin/ld: cannot find -lc^M
collect2: error: ld returned 1 exit status^M
Executing on host: gcc
../../../../git/gdb/testsuite/gdb.threads/staticthreads.c -static
-DHAVE_TLS -g -lm -o
/home/yao/Source/gnu/gdb/build-git/x86/gdb/testsuite/gdb.threads/staticthreads
(timeout = 300)
spawn -ignore SIGHUP gcc
../../../../git/gdb/testsuite/gdb.threads/staticthreads.c -static
-DHAVE_TLS -g -lm -o
/home/yao/Source/gnu/gdb/build-git/x86/gdb/testsuite/gdb.threads/staticthreads^M
/usr/bin/ld: cannot find -lm^M
/usr/bin/ld: cannot find -lc^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1
output is:
/usr/bin/ld: cannot find -lm^M
/usr/bin/ld: cannot find -lc^M
collect2: error: ld returned 1 exit status
My glibc version is 2.18 12.fc20 and gcc version is 4.8.2 7.fc20.
--
Yao (éå)