From owner-freebsd-current@FreeBSD.ORG Wed Oct 31 09:43:41 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF8A116A41A for ; Wed, 31 Oct 2007 09:43:41 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (pointyhat.freebsd.org [IPv6:2001:4f8:fff6::2b]) by mx1.freebsd.org (Postfix) with ESMTP id 30B8913C4A3; Wed, 31 Oct 2007 09:43:41 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <47284E4F.5030008@FreeBSD.org> Date: Wed, 31 Oct 2007 10:43:43 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: "Stephan F. Yaraghchi" References: <25f52a3d0710300732x425f0c45vde1a29361096c018@mail.gmail.com> In-Reply-To: <25f52a3d0710300732x425f0c45vde1a29361096c018@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: loader breaks with -O2 optimizations X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 09:43:42 -0000 Stephan F. Yaraghchi wrote: > After making world on a freshly installed 7.0-BETA1 > the system does not boot anymore due to a broken loader: > > > FreeBSD/i386 bootstrap loader, Revision 1.1 > (root@bigblue, Tue Oct 30 11:26:32 CET 2007) > Can't work out which disk we are booting from. > Guessed BIOS device 0xffffffff not found by probes defaulting to disk0: > > panic: free: guard1 fail@ 0x6ded4 from > /usr/src/sys/boot/i386/loader/../../common/module.c:959 > > --> Press a key on the console to reboot <-- > > > I found out that the following line in my make.conf causes > the problem: > > CFLAGS= -O2 -funroll-loops -pipe > > > After changing down to -O1 and making /usr/src/sys/boot again > the systems behaves properly at boot. > > Is this behavior intended? Maybe, what happens if you use just -O2 -pipe? -funroll-loops is not an appropriate thing to be using globally anyway, unless your intention is to randomly make some code slower. Kris