From owner-freebsd-hackers@FreeBSD.ORG Tue Apr 13 06:49:10 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4957A1065677 for ; Tue, 13 Apr 2010 06:49:10 +0000 (UTC) (envelope-from krivenok.dmitry@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id C6B5D8FC18 for ; Tue, 13 Apr 2010 06:49:09 +0000 (UTC) Received: by ewy24 with SMTP id 24so1310311ewy.33 for ; Mon, 12 Apr 2010 23:49:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:received:message-id:subject:from:to:cc:content-type; bh=72FJcfLtcO+2Tx4sViGOILecEDtQ4v/LUs9r4Jn7ias=; b=PDNfqEuvCILcvV1HyxFddzrKDX4/umY8liumRUxTc8n+66nfmNGGM6rXBRy+mqKwxK BApISXvylYEqHwL1VK9HwXUbfbe1DeFnm5OcVjcAictahE/CsEEOz50yCNNaKpcUBF32 GCUOfToQrXXboRxbE3NhZEhmTinuRiUYynM/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=HQYj3fxfnJ9vzTsrAwrnGkgC7ZjBa/lH5/H62DXWFBTs2dM3O5lNyWWe2E9G2fTuwk mJoGKnZlA2lrTREvj5mWDIvMwWEb+Rx18cvJ6D0C/i5HAEu8VtJ8BZZIcqVQrewA9ytV gmrsLNXuOAYcNXDMe/ACI21nfn2aphqSqZQdY= MIME-Version: 1.0 Received: by 10.213.19.76 with HTTP; Mon, 12 Apr 2010 23:49:08 -0700 (PDT) In-Reply-To: <20100412195413.GG12315@cicely7.cicely.de> References: <20100412195413.GG12315@cicely7.cicely.de> Date: Tue, 13 Apr 2010 10:49:08 +0400 Received: by 10.213.25.78 with SMTP id y14mr2633625ebb.59.1271141348618; Mon, 12 Apr 2010 23:49:08 -0700 (PDT) Message-ID: From: Dmitry Krivenok To: ticso@cicely.de Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Build world with DEBUG_FLAGS='-g -O0' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 06:49:10 -0000 Is there a simple way to build size constrained parts of world (e.g. bootcode) with '-O2' and other parts with '-O0'? On Mon, Apr 12, 2010 at 11:54 PM, Bernd Walter wrote: > On Mon, Apr 12, 2010 at 10:34:30PM +0400, Dmitry Krivenok wrote: > > Hello Hackers, > > > > I'm trying to build FreeBSD-CURRENT (r206494) with DEBUG_FLAGS='-g -O0'. > > > > Below are the commands I executed: > > > > export DEBUG_FLAGS='-g -O0' > > > > cd /usr/src/ > > > > time make buildworld > > > > > > I got the following error: > > > > ... > > > > ... > > > > objcopy -S -O binary boot2.out boot2.bin > > > > btxld -v -E 0x2000 -f bin -b > > /usr/src/obj/usr/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr -o > > boot2.ld -P 1 boot2.bin > > > > kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1 > > > > client: fmt=bin size=20ed text=0 data=0 bss=0 entry=0 > > > > output: fmt=bin size=297d text=200 data=277d org=0 entry=0 > > > > -2941 bytes available > > > > *** Error code 1 > > > > > > > > Stop in /usr/src/sys/boot/i386/boot2. > > > > *** Error code 1 > > > > > > > > Stop in /usr/src/sys/boot/i386. > > > > *** Error code 1 > > > > > > > > Stop in /usr/src/sys/boot. > > > > *** Error code 1 > > > > > > > > Stop in /usr/src/sys. > > > > *** Error code 1 > > > > > > > > Stop in /usr/src. > > > > *** Error code 1 > > > > > > > > Stop in /usr/src. > > > > *** Error code 1 > > > > > > > > Stop in /usr/src. > > > > > > > > real 87m23.033s > > > > user 53m7.195s > > > > sys 30m10.744s > > > > > > Error message "-2941 bytes available" is not clear for me :) > > What's wrong? > > It is 2941 bytes too big for bootcode. > Bootcode is size constrained. > > > > > Thank you beforehand! > > > > P.S. > > Note that compiling with DEBUG_FLAGS='-g' works fine. > > Yes - because it compiles with -O2 then, which allows the compiler > to buld smaller code. > > -- > B.Walter http://www.bwct.de > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. > -- Sincerely yours, Dmitry V. Krivenok e-mail: krivenok.dmitry@gmail.com skype: krivenok_dmitry jabber: krivenok_dmitry@jabber.ru icq: 242-526-443