From owner-freebsd-toolchain@FreeBSD.ORG Sat Feb 19 11:51:26 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCC53106566C; Sat, 19 Feb 2011 11:51:26 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 983B58FC0C; Sat, 19 Feb 2011 11:51:25 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 7069B9CB22A; Sat, 19 Feb 2011 12:51:24 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Oipn3TVW4xtT; Sat, 19 Feb 2011 12:51:12 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 795BD9CB32B; Sat, 19 Feb 2011 12:51:12 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id p1JBpCx3065706; Sat, 19 Feb 2011 12:51:12 +0100 (CET) (envelope-from rdivacky) Date: Sat, 19 Feb 2011 12:51:12 +0100 From: Roman Divacky To: Alexander Best Message-ID: <20110219115112.GA65227@freebsd.org> References: <20110219010136.GA92824@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110219010136.GA92824@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-toolchain@freebsd.org Subject: Re: [RFC] code changes/removal in boot2.c and ufsread.c so clang can compile boot2 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Feb 2011 11:51:26 -0000 On Sat, Feb 19, 2011 at 01:01:36AM +0000, Alexander Best wrote: > hi everybody, > > r218745 triggered quite a discussion about dead code in boot2.c. i talked to > roman (rdivacky@) and we were trying to improve the situation so that boot2 > would build with clang 2.8 (base) and the latest development version of > clang (trunk). a lot of the ideas came from Bruce (bde@). > > i'd really appreciate, if somebody could have a look at this patchset. for me > it strips down the boot2 code so clang is able to compile it just fine. please > bear in mind that this has to work with boot2 supporting UFS1 *and* UFS2. so > please be sure not to override BOOT2_UFS in your src.conf or some place else. > > you should be able to test the (hopefully sucessfully) compiled boot2 binary > by copying it to /boot. please be sure to keep a backup of your existing boot2 > file in case something breaks. no, just copying it to /boot is not enough. you have to run bsdlabel -B to actually install it > the patchset (against a recent HEAD) can be found here: > http://people.freebsd.org/~arundel/patches/boot2.c.diff2 the patch is wrong - you cant remove a.out support as "loader" still uses that I like the int -> unsigned parts of the patch and also the memsize() removal may be interesting. roman