From owner-freebsd-stable@freebsd.org Thu Apr 26 09:55:31 2018 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30D19FA8618 for ; Thu, 26 Apr 2018 09:55:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2FB579831 for ; Thu, 26 Apr 2018 09:55:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 069AD31850; Thu, 26 Apr 2018 11:55:23 +0200 (CEST) From: Dimitry Andric Message-Id: <1FDCF15C-E9FD-4746-9C89-F669EF4BA7C5@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_6AEA95C7-1CE5-4615-9081-CB7C7C5FE091"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Subject: Re: gptboot broken when compiled with clang 6 and WITHOUT_LOADER_GELI -- clang 5 is OK Date: Thu, 26 Apr 2018 11:55:19 +0200 In-Reply-To: <20180425165840.GA1330@bali> Cc: FreeBSD Stable To: Andre Albsmeier References: <20180425165840.GA1330@bali> X-Mailer: Apple Mail (2.3445.6.18) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2018 09:55:31 -0000 --Apple-Mail=_6AEA95C7-1CE5-4615-9081-CB7C7C5FE091 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 25 Apr 2018, at 18:58, Andre Albsmeier = wrote: >=20 > I have set up a new system disk for an i386 11.2-PRERELEASE box. I did = the > usual >=20 > gpart create -s gpt $disk > gpart add -t freebsd-boot -s 984 $disk > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 $disk > ... >=20 > thing, just to notice that the box wouldn't boot. It seems to hang = where > stage 2 should be run -- when the '\' should start spinning the screen > turns white and the box hangs (tested on two machines, an Asus P5W and = a > Supermicro A2SAV). >=20 > So I replaced gptboot on the new disk by the one from an older machine > and everything was fine. I wanted to find out what is actually causing > the issue and recompiled /usr/src/stand after updating the old sources > in several steps. >=20 > Eventually it turned out that it depends on the compiler. When = compiling > the latest /usr/src/stand with clang 5.0.1 the resulting gptboot = works. > When using 6.0.0 it doesn't. To be exact, it's gptboot.o which is = causing > the problems. When using a gptboot.o from a clang 5 system it is OK, = when > using a gptboot.o from a clang 6 system it fails. >=20 > To add more confusion: I usually have WITHOUT_LOADER_GELI in my = make.conf. > When removing this, the resulting gptboot works even when compiled = with > clang 6... >=20 > I can reproduce this in case s.o. wants me to do some tests... I can't reproduce it on my end, unfortunately. I downloaded the latest FreeBSD-11.2-PRERELEASE-i386-20180420-r332802 snapshot, installed it to a GPT partitioned disk, and it boots just fine. This snapshot corresponds to r332802, which has clang 6.0.0, with the EFLAGS change still reverted, so I assume its copy of gptboot is also compiled with that. Which exact revision of the base system were you using? -Dimitry --Apple-Mail=_6AEA95C7-1CE5-4615-9081-CB7C7C5FE091 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWuGiBwAKCRCwXqMKLiCW oytNAJ9JUjejO5EFMja/42hOL4tLmopAQwCeM5sQ7yafqr3UwG30CyuqgESVoq8= =2bix -----END PGP SIGNATURE----- --Apple-Mail=_6AEA95C7-1CE5-4615-9081-CB7C7C5FE091--