Fails to build sys/i386/boot2 with gcc 4.9
Roman Divacky
rdivacky at freebsd.org
Sun Mar 29 08:28:18 UTC 2015
> > I used this script to build with gcc 4.9:
> >
> > https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/cross-build.sh
> >
> > Buildling sys/i386/boot2 failed:
> ...
> > output: fmt=bin size=21ef text=200 data=1fef org=0 entry=0
> > -1007 bytes available
> > *** Error code 1
>
> Oof, this is going to be hard to fix. For some reason, boot2 is one of
> those programs that keeps getting worse (i.e. larger) with *each* new
> compiler version, be it gcc or clang!
>
> The last few times when we imported a new clang version, we had to jump
> through several hoops, and attempted to shrink the code again with
> various cleanups. Even then, we don't have a lot of headroom.
>
> If it is now also becoming a problem with gcc 4.9, we should really
> start looking for a more permanent solution, e.g.:
> * Getting rid of the 7680 byte limit (seems to be impossible?)
> * Rewrite most of (or all of) boot2 in assembly
We can also get rid of UFS1 support... That shrinks the code a lot.
More information about the freebsd-toolchain
mailing list