From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26099 invoked by alias); 1 Sep 2002 16:04:35 -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 26092 invoked from network); 1 Sep 2002 16:04:34 -0000 Received: from unknown (HELO mulga.cs.mu.OZ.AU) (128.250.1.22) by sources.redhat.com with SMTP; 1 Sep 2002 16:04:34 -0000 Received: from ceres.cs.mu.oz.au (ceres.cs.mu.OZ.AU [128.250.25.4]) by mulga.cs.mu.OZ.AU with ESMTP id CAA18889; Mon, 2 Sep 2002 02:04:29 +1000 (EST) Received: from fjh by ceres.cs.mu.oz.au with local (Exim 3.35 #1 (Debian)) id 17lXD9-0004z7-00; Mon, 02 Sep 2002 02:04:27 +1000 Date: Sun, 01 Sep 2002 09:04:00 -0000 From: Fergus Henderson To: Mike Laman Cc: GCC Subject: Re: __main Message-ID: <20020901160425.GA13739@ceres.cs.mu.oz.au> References: <002f01c24f89$6ad6efa0$0a00000a@zarquin> <20020830044008.A479336@murlibobo.cs.mu.OZ.AU> <001e01c24fe4$f4b6e580$5aa80844@fed1.sdca.home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001e01c24fe4$f4b6e580$5aa80844@fed1.sdca.home.com> User-Agent: Mutt/1.3.28i X-SW-Source: 2002-09/txt/msg00004.txt.bz2 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.