title: Proper way to build clang and libc++ together (bootstrap)
body: <p>I would like to build a recent clang + llvm + libc++. I'm currently on a system (based on CentOS 6.6) where I can't easily get binary packages of clang, but where I can set up a GCC recent enough for building clang (for example 4.9), by setting some environment variables.</p>
  
  <p>I'd like my version of clang to be</p>
  
  <ul>
  <li>Portable, that is no hardcoded paths (e.g. using <code>-rpath $ORIGIN</code>)</li>
  <li>Neither dependent on the system gcc nor the imported gcc 4.9 (that is, their C/C++ runtimes)</li>
  <li>In particular, neither the compilers, the compiler-as-a-library libclang.so, nor programs built with the new compiler should depend on libstdc++, but they should use the newly built libc++.</li>
  </ul>
  
  <p>I can do this, but it involves putting clang, llvm, libc++, libc++abi (and things I might have forgotten) in one tree, building clang from one build directory, then setting a lot of flags blindly and building it again from a second build directory.</p>
  
  <p>Is there another proper way of bootstrapping clang with libc++? I believe there must be, since the official binaries of llvm &amp; clang are self-sufficient as I described above.</p>