title: GCC-C++ Cross compiler, missing libraries
body: <p>I am attempting to go through the <a href="https://wiki.osdev.org/Bare_Bones" rel="nofollow noreferrer">bare bones tutorial</a> on osdev. I would like to build my kernel using C++. When I try to compile, I get a some linker errors:</p>
  
  <pre><code>~/opt/cross/lib/gcc/i686-elf/7.3.0/../../../../i686-elf/bin/ld: cannot find crt0.o: No such file or directory
  ~/opt/cross/lib/gcc/i686-elf/7.3.0/../../../../i686-elf/bin/ld: cannot find -lstdc++
  ~/opt/cross/lib/gcc/i686-elf/7.3.0/../../../../i686-elf/bin/ld: cannot find -lm
  ~/opt/cross/lib/gcc/i686-elf/7.3.0/../../../../i686-elf/bin/ld: cannot find -lc
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>I followed the instructions to <a href="https://wiki.osdev.org/GCC_Cross-Compiler" rel="nofollow noreferrer">make a cross compiler</a>. I am on macOS so I followed the OS X instructions, figuring that they would still be relevant. </p>
  
  <p>I do realize that I am not going to have full runtime support from C++. I took a course at my university last semester on operating systems, but they setup much for us (the boot file, basic kernel functionality like putting a character on the screen, etc.) and also provided a runtime environment for us to use so I never got the opportunity to learn how to do this all on my own. I would like to build the kernel in C++ for the sake of building it in C++ and seeing how that will differ from the kernel that we build in C. </p>
  
  <p>How can I build these libraries?</p>