Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2011 12:51:12 +0100
From:      Roman Divacky <rdivacky@freebsd.org>
To:        Alexander Best <arundel@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: [RFC] code changes/removal in boot2.c and ufsread.c so clang can compile boot2
Message-ID:  <20110219115112.GA65227@freebsd.org>
In-Reply-To: <20110219010136.GA92824@freebsd.org>
References:  <20110219010136.GA92824@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110219115112.GA65227>