Date: Sat, 28 Mar 2015 22:37:16 -0600 From: Warner Losh <imp@bsdimp.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: "freebsd-testing@freebsd.org" <freebsd-testing@freebsd.org>, FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Subject: Re: Fails to build sys/i386/boot2 with gcc 4.9 Message-ID: <2232E613-6248-4A78-BCB3-2D82AF8EC094@bsdimp.com> In-Reply-To: <20683705-0EBA-4B8F-A0CE-9C06B8003BBE@FreeBSD.org> References: <CAG=rPVcXPMqifAJvg_-XNWrOUzDLya1UMWW5KMymymyayM25=w@mail.gmail.com> <20683705-0EBA-4B8F-A0CE-9C06B8003BBE@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_0507C6D9-DC61-4DCE-A5C6-02152AA25B0E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Mar 28, 2015, at 5:33 PM, Dimitry Andric <dim@FreeBSD.org> wrote: >=20 > On 29 Mar 2015, at 00:05, Craig Rodrigues <rodrigc@FreeBSD.org> wrote: >>=20 >> To work around the problems build rescue, this time I used a build = host >> running FreeBSD-CURRENT at svn revision r280353 >>=20 >> I took this patch for libc++ and applied it to my tree: >>=20 >> http://reviews.llvm.org/D8461 >=20 > I've only got one minor remark left on that fix, which is that it > doesn't work for gcc 4.7. Once we either say that version of gcc is > just buggy and can't be helped, or have some other way of fixing the > original problem, I'll import it. >=20 >=20 >=20 >> I used this script to build with gcc 4.9: >>=20 >> = https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/cross-buil= d.sh >>=20 >> Buildling sys/i386/boot2 failed: > ... >> output: fmt=3Dbin size=3D21ef text=3D200 data=3D1fef org=3D0 entry=3D0 >> -1007 bytes available >> *** Error code 1 >=20 > 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! >=20 > 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. >=20 > 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 The 7680 byte limit is a hard limit. Rewriting in assembler is possible, but just using the 4.2.1-compiled .s = file might be a good place to start. Warner --Apple-Mail=_0507C6D9-DC61-4DCE-A5C6-02152AA25B0E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIbBAEBCgAGBQJVF4F8AAoJEGwc0Sh9sBEARpcP+KzDBa6DY1Z9HxQmwWLawrCL uku9dXdY7nHII3R4Rc4kccliV65RoY1ajVtP4t+yRQURpDyUPv11wYPCu9knqkyH cTCpDfinY//APg+IY1VHKaoGKAjTeOyf8Hsfvxz/qMqA45VPYHH6ZD/OHNv1fqlb hTk+YbO3OWdPZO0cLH5m/yj29/d+BPbIvViAkqrvKxDTeYT+8R4fzKZYN6hfQXSP 15j3qXwUaFhgsonzmgeM1q/c8LJZYmuA6nhlS8qGf2/SIWeoaoHttdTSVEGIoW3b TSx0G/WwFJ3Ndwr7+MsIerv3rfQdLAPNOcK8DKhzpINKU2RdDwO0jUcIZ3KVI80y vPfZXxINCZx5DKIprooROV9EdEg6wFGxSiaMFiA+RpwWMnkCeY7hRSlf0afs4AMY 1FIiGppmXy+21l83AJJSET+H4PEJggDMGuJlsKJQFDcEWs66LGZ8cPYSMNMAXvpB fenjWPht94Mk3af1QBrtYgBQJXWeSmdPsQfnAxmJTHw22Xjv+RWqQQK7A0GAR1bH B/DQn2kBUUEIBDF0Ie+8bjEx891dREgythlv3O1pcuavbb94mHe2UA+8U1vfahJ8 ZA3jd+b+9IwkiRiapg6V1elrQ3pp1Obc71e9Z+Mq2+up7fKZiOlz57PvS2g01vYP /OAr56eIQ7xZGKHymAs= =O8Dy -----END PGP SIGNATURE----- --Apple-Mail=_0507C6D9-DC61-4DCE-A5C6-02152AA25B0E--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2232E613-6248-4A78-BCB3-2D82AF8EC094>