From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28381 invoked by alias); 28 Jan 2008 19:15:29 -0000 Received: (qmail 28370 invoked by uid 22791); 28 Jan 2008 19:15:28 -0000 X-Spam-Check-By: sourceware.org Received: from exprod6og105.obsmtp.com (HELO exprod6og105.obsmtp.com) (64.18.1.189) by sourceware.org (qpsmtpd/0.31) with SMTP; Mon, 28 Jan 2008 19:15:04 +0000 Received: from source ([63.240.6.3]) (using TLSv1) by exprod6ob105.postini.com ([64.18.5.12]) with SMTP; Mon, 28 Jan 2008 11:15:00 PST Received: from d01smtp07.Mi8.com ([172.16.1.114]) by Outbound01.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 28 Jan 2008 14:16:54 -0500 Received: from MI8NYCMAIL14.Mi8.com ([172.16.1.192]) by d01smtp07.Mi8.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 28 Jan 2008 14:16:54 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Subject: RE: Tiny GCC: Pure, Unadulterated, Object Code Date: Tue, 29 Jan 2008 01:36:00 -0000 Message-ID: In-Reply-To: <479ABB8F.92A93776@dessent.net> From: "Scott Moore" To: , "Michael Witten" X-TM-AS-Product-Ver: SMEX-7.0.0.1345-5.0.1023-15696.000 X-TM-AS-Result: No--6.796300-8.000000-1 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-01/txt/msg00297.txt.bz2 > You can't divorce a compiler from the target. The target's ABI specifies= a great number of details that are > very >much relevant to the compiler, such as: > ... > So you can't just make some kind of generic "386" gcc and expect it to ha= ve any kind of useful ability, unless > you are only ever doing to compile 100% freestanding code like a kernel o= r a OS-less bare metal system. > Otherwise it must be targeted to a specific platform, i.e. > i386-pc-linux or i386-pc-mingw. > Brian Just a nit, this is true of GCC certainly, but not compilers in general. It= is in fact quite possible and compilers exist that target x386 in general. In fact, I don't = think it makes a lot of sense in many cases to build the calling convention of the operating= system into the compiler. For example, the Windows calling convention for system calls is a= very inefficient calling convention for general use, because it comes from the days that Mic= rosoft C didn't perform register passed parameters. Microsoft themselves don't use the conv= ention for calls between routines, the system calls must be marked and coded separatel= y. Both GCC and Microsoft C build both passing conventions into the compiler, but there is = no particular reason the system calls cannot be done by a thunk layer, and in fact there = are x386 compilers that work that way. Scott Moore --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.762 / Virus Database: 510 - Release Date: 9/13/2004 =20