This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] libstdc++/70503 Ensure std::thread helpers have internal linkage


On Thu, Apr 07, 2016 at 02:34:51PM +0100, Jonathan Wakely wrote:
> On 07/04/16 15:27 +0200, Tom de Vries wrote:
> >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)
> 
> Hmm, I'm not sure whether it's better to use -gdwarf-2 or add
> { dg-prune-output "dwarf version" }

Or perhaps instead change the test, so that instead of testing for
undefined symbols it provides some definition of those 2 symbols
and makes sure libstdc++.a(thread.o) is linked in too (such as
using std::thread::detach or similar somewhere).
Then in the buggy libstdc++ case, because those old definitions
were strong rather than weak, it should fail to link, while with
fixed libstdc++ succeed.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]