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: std thread,mutex,cv and static linking with GCC


Thanks. For other's future reference:

I've verified that replacing the -pthread (or -lpthread) option in the linker invocation with '-Wl,--whole-archive -lpthread -Wl,--no-whole-archive' solves the problem. Be aware that the -pthread option in the compiler invocation has to be kept there.

-----Original Message-----
From: Jonathan Wakely [mailto:jwakely.gcc@gmail.com] 
Sent: Wednesday, October 22, 2014 10:13 AM
To: Damian Lezama
Cc: libstdc++@gcc.gnu.org
Subject: Re: std thread,mutex,cv and static linking with GCC

On 22 October 2014 18:10, Jonathan Wakely wrote:
> Oh I just noticed that you said:
> creating an std::thread also works, but the test crashes when using 
> the cv

That means the change on trunk probably won't help.

But as Jakub says at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58909 you should be able to use --whole-archive

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