<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    The clang/LLVM based ELLCC project (<a class="moz-txt-link-freetext" href="http://ellcc.org">http://ellcc.org</a>), after having
    reached a huge milestone (
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="http://ellcc.org/blog/?p=231">http://ellcc.org/blog/?p=231</a>)
    has now successfully compiled itself.<br>
    <br>
    The steps were:<br>
    1. Use gcc to build the compiler with Linux standard libraries.<br>
    2. Use ecc to build itself with libc++, libc++ABI, libunwind, musl,
    and compiler-rt<br>
    3. Use the newly built compiler to build itself again.<br>
    <br>
    One interesting side note: The compiler was 12MB smaller after it
    built itself.<br>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">ct-fw-88
        ellcc 622 % size */Release+Asserts/bin/ecc<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">  
        text    data     bss     dec     hex filename<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">52415858       
        2152024   84768 54652650        341eeea
        llvm-build/Release+Asserts/bin/ecc<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">40222706       
        2117136  135416 42475258        2881efa
        llvm-build-self/Release+Asserts/bin/ecc<br>
      </span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">Even
        more interesting, it was compiled statically. No dynamic
        libraries needed:<br>
      </span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">ct-fw-88
        ellcc 623 % ldd */Release+Asserts/bin/ecc<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">llvm-build/Release+Asserts/bin/ecc:<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        linux-vdso.so.1 =>  (0x00007fff2ffff000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libz.so.1 => /lib64/libz.so.1 (0x00007facd87e1000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libpthread.so.0 => /lib64/libpthread.so.0
        (0x00007facd85c4000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libncurses.so.5 => /lib64/libncurses.so.5
        (0x00007facd837c000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        librt.so.1 => /lib64/librt.so.1 (0x00007facd8173000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libdl.so.2 => /lib64/libdl.so.2 (0x00007facd7f6f000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libstdc++.so.6 =>
        /home/de023789/gnulocal/lib64/libstdc++.so.6
        (0x00007facd7c6e000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libm.so.6 => /lib64/libm.so.6 (0x00007facd7a18000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libgcc_s.so.1 => /home/de023789/gnulocal/lib64/libgcc_s.so.1
        (0x00007facd7803000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        libc.so.6 => /lib64/libc.so.6 (0x00007facd74a5000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        /lib64/ld-linux-x86-64.so.2 (0x00007facd89f7000)<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">llvm-build-self/Release+Asserts/bin/ecc:<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">       
        not a dynamic executable<o:p></o:p></span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">ct-fw-88
        ellcc 624 %<br>
      </span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">That
        is very cool.<br>
      </span></p>
    <p class="MsoNormal"><span
style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">-Rich<br>
      </span></p>
    <br>
  </body>
</html>