title: Building cross compiler: pthread.h: No such file or directory
body: <p>I'm currently trying to compile my own gcc 9.1.0 cross compiler for <code>aarch64-linux-gnu</code> target. I used this tutorial: <a href="https://wiki.osdev.org/GCC_Cross-Compiler" rel="nofollow noreferrer">https://wiki.osdev.org/GCC_Cross-Compiler</a></p>
  
  <p>The compile progress for the gcc and g++ compiler seems to finish without errors, but allways when I try to compile <code>libgcc</code> with the command <code>make all-target-libgcc</code> I run into this error:</p>
  
  <pre><code>In file included from ../../../gcc-9.1.0/libgcc/gthr.h:148,
                   from ../../../gcc-9.1.0/libgcc/libgcov-interface.c:27:
  ./gthr-default.h:35:10: fatal error: pthread.h: No such file or directory
     35 | #include &lt;pthread.h&gt;
        |          ^~~~~~~~~~~
  compilation terminated.
  </code></pre>
  
  <p><code>g++ --version</code> on my build maschine prints:</p>
  
  <pre><code>g++ (GCC) 9.1.0
  Copyright (C) 2019 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  </code></pre>
  
  <p>And my configuration command for <code>gcc</code> is:
  <code>../gcc-9.1.0/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --without-headers</code>
  With:</p>
  
  <pre><code>export TARGET=aarch64-linux-gnu
  export PREFIX=/opt/aarch64-linux-gnu
  </code></pre>
  
  <p>What do I forget?</p>