[patch] libstdc++/70503 Ensure std::thread helpers have internal linkage
Tom de Vries
Tom_deVries@mentor.com
Thu Apr 7 13:28:00 GMT 2016
Hi,
FYI, this testcase fails for me as follows:
...
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only
handles version 2 and 3 information.^M
/tmp/ccMBMHB5.o: In function `main':^M
70503.cc:(.text.startup.main+0x5): undefined reference to
`execute_native_thread_routine'^M
/usr/bin/ld: Dwarf Error: found dwarf version '0', this reader only
handles version 2 and 3 information.^M
70503.cc:(.text.startup.main+0xa): undefined reference to
`execute_native_thread_routine_compat'^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1
output is:
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only
handles version 2 and 3 information.^M
/tmp/ccMBMHB5.o: In function `main':^M
70503.cc:(.text.startup.main+0x5): undefined reference to
`execute_native_thread_routine'^M
/usr/bin/ld: Dwarf Error: found dwarf version '0', this reader only
handles version 2 and 3 information.^M
70503.cc:(.text.startup.main+0xa): undefined reference to
`execute_native_thread_routine_compat'^M
collect2: error: ld returned 1 exit status^M
FAIL: 30_threads/thread/70503.cc (test for errors, line 31)
FAIL: 30_threads/thread/70503.cc (test for errors, line 32)
FAIL: 30_threads/thread/70503.cc (test for excess errors)
...
$ /usr/bin/ld -v
GNU ld (GNU Binutils for Ubuntu) 2.20.1-system.20100303
$ cat /etc/issue
Ubuntu 10.04.4 LTS \n \l
Thanks,
- Tom
On 05/04/16 19:23, Jonathan Wakely wrote:
> On 05/04/16 14:37 +0100, Jonathan Wakely wrote:
>> Ensure std::thread helpers have internal linkage
>> PR libstdc++/70503
>> * src/c++11/thread.cc (execute_native_thread_routine,
>> execute_native_thread_routine_compat): Give internal linkage.
>> * testsuite/30_threads/thread/70503.cc: New test.
>
> This small tweak to the new test checks that -static works before
> trying to run it.
>
> Tested x86_64-linux, with and without static glibc installed.
>
> Committed to trunk.
>
> patch.txt
>
>
> commit 1fdc9bbe912281ba6d573fc28c53817402656e57
> Author: Jonathan Wakely <jwakely@redhat.com>
> Date: Tue Apr 5 18:18:36 2016 +0100
>
> * testsuite/30_threads/thread/70503.cc: Require -static to work.
>
> diff --git a/libstdc++-v3/testsuite/30_threads/thread/70503.cc b/libstdc++-v3/testsuite/30_threads/thread/70503.cc
> index 1763ac2..950d754 100644
> --- a/libstdc++-v3/testsuite/30_threads/thread/70503.cc
> +++ b/libstdc++-v3/testsuite/30_threads/thread/70503.cc
> @@ -19,6 +19,7 @@
> // { dg-options " -std=gnu++11 -static" { target *-*-*gnu* } }
> // { dg-require-cstdint "" }
> // { dg-require-gthreads "" }
> +// { dg-require-effective-target static }
>
> extern "C" {
> void execute_native_thread_routine(void);
>
More information about the Libstdc++
mailing list