From owner-freebsd-toolchain@FreeBSD.ORG Sun Mar 29 08:28:18 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA2AC541; Sun, 29 Mar 2015 08:28:18 +0000 (UTC) Received: from vlakno.cz (mail.vlakno.cz [91.217.96.224]) by mx1.freebsd.org (Postfix) with ESMTP id 6C519D5; Sun, 29 Mar 2015 08:28:17 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 23CCB1D9572A; Sun, 29 Mar 2015 10:27:34 +0200 (CEST) Date: Sun, 29 Mar 2015 10:27:34 +0200 From: Roman Divacky To: Dimitry Andric Subject: Re: Fails to build sys/i386/boot2 with gcc 4.9 Message-ID: <20150329082734.GA13058@vlakno.cz> References: <20683705-0EBA-4B8F-A0CE-9C06B8003BBE@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20683705-0EBA-4B8F-A0CE-9C06B8003BBE@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "freebsd-testing@freebsd.org" , FreeBSD Toolchain X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Mar 2015 08:28:18 -0000 > > 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.