From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4134 Path: news.gmane.org!not-for-mail From: agent Newsgroups: gmane.linux.lib.musl.general Subject: Re: ELLCC has self hosted. Date: Sun, 20 Oct 2013 22:49:59 +0600 Message-ID: <526409B7.3090607@gmail.com> References: <5261BE0C.2000904@pennware.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------090600000903090203080203" X-Trace: ger.gmane.org 1382287974 5566 80.91.229.3 (20 Oct 2013 16:52:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2013 16:52:54 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4138-gllmg-musl=m.gmane.org@lists.openwall.com Sun Oct 20 18:53:00 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VXwFP-0006WE-JA for gllmg-musl@plane.gmane.org; Sun, 20 Oct 2013 18:52:59 +0200 Original-Received: (qmail 23725 invoked by uid 550); 20 Oct 2013 16:52:59 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 23709 invoked from network); 20 Oct 2013 16:52:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=JMigNIUW8lrAEP9/R24QvQYZgMdS2gGfF5ltYH059Jk=; b=o6NZA6h0GpkeoZMkKZpTt78wK7tXszDQQrgL5tu2sJFSvwCjOtvhfVpZMsMmfU1kV8 ndgXWdp+A1iGQElAQfekMLHQaSg+bFnPoDpCEP2PebqxFD8RZESC+Tzmgbm48hTYC3oN w7mqhuAbHnsdxtallgum7WFi5t9L2XrAjpblLumEEQsN7UbWQJ6/miiHtvWr/7ZMj5Xi kYp+PDizROxJd8MZXP3T3ziTyfOTl5BfCNpLImOvikl1CTfZlgTPDxJ2yvuOG6wyRgIj wOagcqydqlrJgxEa0xSTQ+ysQOv2G7yz5aDUtT5KCZ40E0+FxPRSjnGqAF8PLJ44+4Ma aAWw== X-Received: by 10.112.170.134 with SMTP id am6mr56909lbc.61.1382287967115; Sun, 20 Oct 2013 09:52:47 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <5261BE0C.2000904@pennware.com> Xref: news.gmane.org gmane.linux.lib.musl.general:4134 Archived-At: This is a multi-part message in MIME format. --------------090600000903090203080203 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I understand my question is rather stupid, but what is the most preferable way to use ecc as a compiler to build itself? Even if I set cc and cxx variables in the root configure script, it still builds everything with gcc. Is setting CC and CXX environment variables sufficient? Dmitry 19.10.2013 05:02, Richard Pennington ?????: > The clang/LLVM based ELLCC project (http://ellcc.org), after having > reached a huge milestone (http://ellcc.org/blog/?p=231) has now > successfully compiled itself. > > The steps were: > 1. Use gcc to build the compiler with Linux standard libraries. > 2. Use ecc to build itself with libc++, libc++ABI, libunwind, musl, > and compiler-rt > 3. Use the newly built compiler to build itself again. > > One interesting side note: The compiler was 12MB smaller after it > built itself. > > ct-fw-88 ellcc 622 % size */Release+Asserts/bin/ecc > > text data bss dec hex filename > > 52415858 2152024 84768 54652650 341eeea > llvm-build/Release+Asserts/bin/ecc > > 40222706 2117136 135416 42475258 2881efa > llvm-build-self/Release+Asserts/bin/ecc > > Even more interesting, it was compiled statically. No dynamic > libraries needed: > > ct-fw-88 ellcc 623 % ldd */Release+Asserts/bin/ecc > > llvm-build/Release+Asserts/bin/ecc: > > linux-vdso.so.1 => (0x00007fff2ffff000) > > libz.so.1 => /lib64/libz.so.1 (0x00007facd87e1000) > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007facd85c4000) > > libncurses.so.5 => /lib64/libncurses.so.5 (0x00007facd837c000) > > librt.so.1 => /lib64/librt.so.1 (0x00007facd8173000) > > libdl.so.2 => /lib64/libdl.so.2 (0x00007facd7f6f000) > > libstdc++.so.6 => /home/de023789/gnulocal/lib64/libstdc++.so.6 > (0x00007facd7c6e000) > > libm.so.6 => /lib64/libm.so.6 (0x00007facd7a18000) > > libgcc_s.so.1 => /home/de023789/gnulocal/lib64/libgcc_s.so.1 > (0x00007facd7803000) > > libc.so.6 => /lib64/libc.so.6 (0x00007facd74a5000) > > /lib64/ld-linux-x86-64.so.2 (0x00007facd89f7000) > > llvm-build-self/Release+Asserts/bin/ecc: > > not a dynamic executable > > ct-fw-88 ellcc 624 % > > That is very cool. > > -Rich > --------------090600000903090203080203 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
I understand my question is rather stupid, but what is the most preferable way to use ecc as a compiler to build itself? Even if I set cc and cxx variables in the root configure script, it still builds everything with gcc. Is setting CC and CXX environment variables sufficient?

Dmitry

19.10.2013 05:02, Richard Pennington пишет:
The clang/LLVM based ELLCC project (http://ellcc.org), after having reached a huge milestone (http://ellcc.org/blog/?p=231) has now successfully compiled itself.

The steps were:
1. Use gcc to build the compiler with Linux standard libraries.
2. Use ecc to build itself with libc++, libc++ABI, libunwind, musl, and compiler-rt
3. Use the newly built compiler to build itself again.

One interesting side note: The compiler was 12MB smaller after it built itself.

ct-fw-88 ellcc 622 % size */Release+Asserts/bin/ecc

   text    data     bss     dec     hex filename

52415858        2152024   84768 54652650        341eeea llvm-build/Release+Asserts/bin/ecc

40222706        2117136  135416 42475258        2881efa llvm-build-self/Release+Asserts/bin/ecc

Even more interesting, it was compiled statically. No dynamic libraries needed:

ct-fw-88 ellcc 623 % ldd */Release+Asserts/bin/ecc

llvm-build/Release+Asserts/bin/ecc:

        linux-vdso.so.1 =>  (0x00007fff2ffff000)

        libz.so.1 => /lib64/libz.so.1 (0x00007facd87e1000)

        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007facd85c4000)

        libncurses.so.5 => /lib64/libncurses.so.5 (0x00007facd837c000)

        librt.so.1 => /lib64/librt.so.1 (0x00007facd8173000)

        libdl.so.2 => /lib64/libdl.so.2 (0x00007facd7f6f000)

        libstdc++.so.6 => /home/de023789/gnulocal/lib64/libstdc++.so.6 (0x00007facd7c6e000)

        libm.so.6 => /lib64/libm.so.6 (0x00007facd7a18000)

        libgcc_s.so.1 => /home/de023789/gnulocal/lib64/libgcc_s.so.1 (0x00007facd7803000)

        libc.so.6 => /lib64/libc.so.6 (0x00007facd74a5000)

        /lib64/ld-linux-x86-64.so.2 (0x00007facd89f7000)

llvm-build-self/Release+Asserts/bin/ecc:

        not a dynamic executable

ct-fw-88 ellcc 624 %

That is very cool.

-Rich


--------------090600000903090203080203--