title: undefined reference to '__gthrw___pthread_key_create(unsigned int*, void (*)(void*))
body: <p>I'm using 64-bit gcc-4.8.2 to generate a 32-bit target, and my machine is 64-bit. I'm using c++11 concurrency features such as thread, mutex, conditiona_variables and etc.</p>
  
  <p>The linker gave the above error message when trying to link the executable. libMyLib is also part of the project.   </p>
  
  <pre><code>libMyLib.so: undefined reference to '__gthrw___pthread_key_create(unsigned int*, void (*)(void*))
  </code></pre>
  
  <p>nm libMyLib.so | grep pthread_key_create shows:</p>
  
  <pre><code>U _ZL28__gthrw___pthread_key_createPjPFvPvE
  w __pthread_key_create@@GLIBC_2.0
  </code></pre>
  
  <p>where is the symbol 'ghtrw___pthread_key_create' from? I tried adding '-lpthread(-pthread)' as compiler flag, but it does not help.</p>
  
  <p>More information. nm libMyLib.so | grep pthread shows other symbols such as _ZL20__gthread_mutex_lockP15pthread_mutex_t is defined</p>