Skip to content

Compilers

  • We are constantly evaluating the use of new or alternative C compiler implementations in an attempt to further reduce the time required to bootstrap earlier stages of glaucus (stages that are temporary and do not require optimizations)
  • Important notes to consider is that this “alternative” compiler should be able to compile (and/or cross compile) modern versions of gcc as it is what glaucus uses to optimize later stages of the bootstrap
  • A basic test was attempted at the time of writing this article (attempt to compile a modern version of the GNU grep implementation) and compilers were sorted into categories accordingly
  • Currently only clang and gcc are capable of building modern versions of gcc, so it appears the better approach would be to either leverage clang’s cross compilation capabilities or keep the current gcc cross compilation toolchain but utilize -O0 or -O1 to speed up build times early on; an important consideration to be made is that the time saved from early stages of the bootstrap process (stages 1 and 2) should exceed the time wasted by an unoptimized stage 2 gcc that will attempt to compile the rest of the bootstrap stages with optimizations (quality of the final stages will not be affected, but compilation time will be)