From owner-freebsd-toolchain@FreeBSD.ORG Sun Mar 29 18:04:41 2015 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2A7726A for ; Sun, 29 Mar 2015 18:04:41 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB9B4213 for ; Sun, 29 Mar 2015 18:04:41 +0000 (UTC) Received: by pacwe9 with SMTP id we9so145171455pac.1 for ; Sun, 29 Mar 2015 11:04:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=POvIiJc6q8PuL0KV2DT3Mt1SvTZD6RncD/Akmq8gHaY=; b=RrQt7H21hVJhHYFKrRQnWZVcWchUO2eO5HWC6Kk70zAmoqtFbyt0Mg4B7y6fXeaj/a Cnw4VIciysgUap/KeaULpX0CtYwkNd7S9Dmc06sAf3OxYAZkPaD1sPVMPRBzSg7n8EVc KTTAHl43wPYvxIjlbdiOYMew7vVd/xeiSL7FITQUVKwqB7//kZvMc6htS1wErqZPXwJ2 1gb8mv7MphvabJXC34UFVG1AO/TnDjY4sKCwGEepZqvM84pwwESUWhIq3ixwRCJjGBI2 a4Hmku3g6Uu+EvhRwNuvTQud5iP1CgeAIVV+fTbHnLjch+fE7tadNOkiMxwFbZRea+XG NGHg== X-Gm-Message-State: ALoCoQmp2bih/Osu3utIZZC/4OXQbEWcDy3CoeKFSxnE3MYoNH3eB1P5fFmYf8cj1MtsweHdlmmV X-Received: by 10.70.102.101 with SMTP id fn5mr52586103pdb.131.1427652275372; Sun, 29 Mar 2015 11:04:35 -0700 (PDT) Received: from lgwl-achen.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id om6sm8097092pdb.40.2015.03.29.11.04.33 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Mar 2015 11:04:34 -0700 (PDT) Sender: Warner Losh Subject: Re: Fails to build sys/i386/boot2 with gcc 4.9 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A96F48DD-9F5F-44DB-A5D1-2CE1502149AE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <20150329082734.GA13058@vlakno.cz> Date: Sun, 29 Mar 2015 12:04:31 -0600 Message-Id: References: <20683705-0EBA-4B8F-A0CE-9C06B8003BBE@FreeBSD.org> <20150329082734.GA13058@vlakno.cz> To: Roman Divacky X-Mailer: Apple Mail (2.2070.6) Cc: "freebsd-testing@freebsd.org" , FreeBSD Toolchain , Dimitry Andric 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 18:04:42 -0000 --Apple-Mail=_A96F48DD-9F5F-44DB-A5D1-2CE1502149AE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 29, 2015, at 2:27 AM, Roman Divacky = wrote: >=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 >=20 > We can also get rid of UFS1 support... That shrinks the code a lot. No we can=E2=80=99t. And that=E2=80=99s kinda the useless decision to = make if you look at where the 8k limit comes from. UFS1 imposes the 8k limit. UFS2 has no such limit, but there=E2=80=99s = some issues with some old installs listing 8k as the size to fit into the = disklabel reserves of the time. If we built a UFS1-only boot2, that would fit in the 7.5k we have left to play with. We could then build a UFS2-only boot2 that would easily fit in the like 32k limit that UFS2 has. The only reason we went to supporting both was to have something universal. Since it requires a reformat to go from UFS1 -> UFS2 we wanted the transition to be as smooth as possible so you didn=E2=80=99t = have to add boot blocks into the mix. Now the only people that use UFS1 are people with really old systems that are never going to upgrade, or people building new systems with UFS1 because they are space constrained (for whatever reasons that we=E2=80=99re not going to debate here: they are still real). All typical installs are UFS2. As such, with a bit of automation in our boot block writing, and we = should be in good shape. So no, we can=E2=80=99t get rid of UFS1 support and have all our = problems be solved. However, we likely can solve most of the issues by moving away from a single image. Warner --Apple-Mail=_A96F48DD-9F5F-44DB-A5D1-2CE1502149AE 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 iQIcBAEBCgAGBQJVGD6vAAoJEGwc0Sh9sBEAOCUQANHGNvoPEMMT3AVpZ7X+SDlh xGj3WEqn+HkGoGYrmaNuFuas21RgCAALK05q1WgJw1HGvYXsT0E4dFMEBQkY9G2k veP+IqX4vJzcFnE4XpLRUr/59bAvOljHVNDVZ/qFLwVkE9VdrZS158r664QNFCC1 i++B4roNUE12Ew8vqYspei5nojEAg/PU6scUJXh5zpitmEyFOf+yYu4mPKeb0Nz/ j+cnj6NqYBc/Unfu7+GhFfhzAnDNqC3YaruZifxuZQH5cv3K94CE+nwg3YqLc0B2 vyUCi2wDR2rHwe9KOXmM9BDpDuM+1Qk32jZNOSjEeY3s3Ywgq5y20ZSm3BqXuipB +TM+x+c2q0RGDouQbXlbr8HBRqseXdAPaS4hI7SzxC37Rmja4JixuXdO4NQJo8aT aXRhpUHM0UBcZutAmwk4I5zpoReowax5vfl6ePbMYzA8VkcG/vKflDpCVPYm7A+v bGKty/4hTwYg+5lDsYxLEGJiJReZeOmhU14v9kbqPlv6dXwX/a6+qg2wewSVG5D5 r5Iw64Alm7zBld00BzGsnU2aGZVBjf7FKSG4h7MNfjyMLp+QisdkJYFdqTELL8Pp aQpfB/yGY0H6PZ/1JkaBMwAghbsD+gh2F6oIIV05VnQl20BW6KFnwVn5z5FHrYWw 384tREhodceyLacoeetv =IwfO -----END PGP SIGNATURE----- --Apple-Mail=_A96F48DD-9F5F-44DB-A5D1-2CE1502149AE--