From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24106 invoked by alias); 1 Sep 2002 20:22:41 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 24099 invoked from network); 1 Sep 2002 20:22:41 -0000 Received: from unknown (HELO fed1mtao03.cox.net) (68.6.19.242) by sources.redhat.com with SMTP; 1 Sep 2002 20:22:41 -0000 Received: from cx554943a ([68.8.168.90]) by fed1mtao03.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with SMTP id <20020901202239.PJQU7696.fed1mtao03.cox.net@cx554943a> for ; Sun, 1 Sep 2002 16:22:39 -0400 Message-ID: <000501c251f5$8ad6b740$5aa80844@fed1.sdca.home.com> From: "Mike Laman" To: "GCC" References: <002f01c24f89$6ad6efa0$0a00000a@zarquin> <20020830044008.A479336@murlibobo.cs.mu.OZ.AU> <001e01c24fe4$f4b6e580$5aa80844@fed1.sdca.home.com> <20020901160425.GA13739@ceres.cs.mu.oz.au> <001901c251f4$5cd6db50$5aa80844@fed1.sdca.home.com> Subject: Re: __main Date: Sun, 01 Sep 2002 13:22:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2002-09/txt/msg00008.txt.bz2 I tried it. I still get the __main call. Any other ideas? I do appreciate the help and time! Tks, Mike ----- Original Message ----- From: "Mike Laman" To: "GCC" Sent: Sunday, September 01, 2002 1:15 PM Subject: Re: __main > I'm trying very hard not to modify the source. > > I've got to think that others porting GCC to small chips will have the > same issue. For me space is very important. Unfortunately, the bytes count. > > Also the standard assembler for this chip does not accept an "_" for > the first character. Don't look at me - I didn't write it, but I do need to > interface with it. > > I'll give -ffreestanding a try. > > Thanks, > Mike > ----- Original Message ----- > From: "Fergus Henderson" > To: "Mike Laman" > Cc: "GCC" > Sent: Sunday, September 01, 2002 9:04 AM > Subject: Re: __main > > > > On 29-Aug-2002, Mike Laman wrote: > > > When running a C cross compiler where one does not want a call > > > to "__main()" to be emitted, how can one turn it off? > > > > I don't know off-hand if it can be turned off. > > (I doubt if it can, but perhaps with `-ffreestanding'??) > > Of course you can always turn it off by modifying the source code! > > > > Probably the easiest solution is to just define a dummy __main() > > function that does nothing. You'd better be sure that you don't > > link in any C++ programs or libraries, though, because they might > > not work properly if constructors for static objects are not > > executed. > > > > -- > > Fergus Henderson | "I have always known that the > pursuit > > The University of Melbourne | of excellence is a lethal habit" > > WWW: | -- the last words of T. S. Garp. >