From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by listman.redhat.com (Postfix) with ESMTP id EE97B41177 for ; Wed, 13 Nov 2002 13:19:43 -0500 (EST) Received: (from mail@localhost) by int-mx1.corp.redhat.com (8.11.6/8.11.6) id gADIJhh08989 for axp-list@listman.redhat.com; Wed, 13 Nov 2002 13:19:43 -0500 Received: from mx1.redhat.com (mx1.redhat.com [172.16.48.31]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with SMTP id gADIJhD08985 for ; Wed, 13 Nov 2002 13:19:43 -0500 Received: from ellpspace.math.ualberta.ca (ellpspace.math.ualberta.ca [129.128.207.67]) by mx1.redhat.com (8.11.6/8.11.6) with SMTP id gADHuUw09803 for ; Wed, 13 Nov 2002 12:56:30 -0500 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.11.6/8.11.6) id gADIJeN05371 for axp-list@redhat.com; Wed, 13 Nov 2002 11:19:40 -0700 Date: Wed, 13 Nov 2002 11:19:40 -0700 From: Michal Jaegermann To: axp-list@redhat.com Subject: Re: Fwd: LFS'ing an alpha, continued Message-ID: <20021113111940.B5274@ellpspace.math.ualberta.ca> References: <200211130708.47336.kelledin+AXP@skarpsey.dyndns.org> <877kfhh6e3.fsf@student.uni-tuebingen.de> <200211131109.59664.kelledin+AXP@skarpsey.dyndns.org> <20021113174128.M87959@alphadriven.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20021113174128.M87959@alphadriven.org>; from voodoo@alphadriven.org on Wed, Nov 13, 2002 at 12:41:28PM -0500 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Wed, Nov 13, 2002 at 12:41:28PM -0500, Peter Petrakis wrote: > > > Are you sure it isn't rather caused by gcc optimizing > > > printf("foo\n") > > > to > > > puts("foo") > > > ? > > > > > > (Yes, it really does that. Pretty clever, eh?) > > > > Yikes, that would do it. > > > > Hmmm. > > > > My next question would be, how do we keep gcc from doing that? I > > assume it's some spanking-new feature in gcc3... > > -O0 oughta do it. The other way out would be to provide 'puts()' in a "private" library. It can be trivially implemented in terms of 'printf()'. :-) If built-ins from gcc3 are getting you instead then '-fno-builtin' in compilation flags should solve the problem and there is always also '-ffreestanding'. At least a "bootloader" part of the whole package (there are other programs there as well) is really "freestanding". Michal