From owner-freebsd-emulation@freebsd.org Mon Sep 25 21:51:20 2017 Return-Path: Delivered-To: freebsd-emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCCFEE2519B for ; Mon, 25 Sep 2017 21:51:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id BACC86B00E for ; Mon, 25 Sep 2017 21:51:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: by mailman.ysv.freebsd.org (Postfix) id BA0B3E2519A; Mon, 25 Sep 2017 21:51:20 +0000 (UTC) Delivered-To: emulation@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B99B2E25198 for ; Mon, 25 Sep 2017 21:51:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C8646B00D for ; Mon, 25 Sep 2017 21:51:20 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: by freefall.freebsd.org (Postfix) id E67AE110E5; Mon, 25 Sep 2017 21:51:19 +0000 (UTC) Delivered-To: vbox@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id D023D110E4 for ; Mon, 25 Sep 2017 21:51:19 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) by mx1.freebsd.org (Postfix) with ESMTP id A996F6B002; Mon, 25 Sep 2017 21:51:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Subject: Re: [virtualbox-ose] Build failure: global register variable To: soralx@cydem.org Cc: vbox@FreeBSD.org References: <20170917195419.431341e7@mscad14> <20170920191710.58d335df@mscad14> <20170921160000.689755f8@mscad14> <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> <20170924180619.23e149be@mscad14> From: Jung-uk Kim Message-ID: <6b02f95f-207b-0f55-8e30-11512979804e@FreeBSD.org> Date: Mon, 25 Sep 2017 17:50:58 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170924180619.23e149be@mscad14> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2nm70CfCPXuLwQqmOidkbnURD84n3NHvx" X-Mailman-Approved-At: Tue, 26 Sep 2017 03:51:10 +0000 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 21:51:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --2nm70CfCPXuLwQqmOidkbnURD84n3NHvx Content-Type: multipart/mixed; boundary="p078gD22HjDb8LmkwwT3pcKwb517hWKfx"; protected-headers="v1" From: Jung-uk Kim To: soralx@cydem.org Cc: vbox@FreeBSD.org Message-ID: <6b02f95f-207b-0f55-8e30-11512979804e@FreeBSD.org> Subject: Re: [virtualbox-ose] Build failure: global register variable References: <20170917195419.431341e7@mscad14> <20170920191710.58d335df@mscad14> <20170921160000.689755f8@mscad14> <5c68323f-5fed-342b-ad92-e74d178f9daf@FreeBSD.org> <20170924180619.23e149be@mscad14> In-Reply-To: <20170924180619.23e149be@mscad14> --p078gD22HjDb8LmkwwT3pcKwb517hWKfx Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 09/24/2017 21:06, soralx@cydem.org wrote: >> Alternatively, one can try changing 'r14' to 'rbp' in definition >>> of "AREG0" for amd64 at src/recompiler/dyngen-exec.h:81. This is >>> the only place where gcc is needed, as clang cannot handle r14 >>> for now [0]. >>> >>> I recompiled kBuild with clang, and succeeded compiling virtualbox-os= e >>> with 'r14' to 'rbp' change. It seems to work normally, but I don't >>> know what are the performance implications of using up rbp. >>> >>> [0] clang/lib/Basic/Targets/X86.h: >>> 860 bool validateGlobalRegisterVariable(StringRef RegName, >>> unsigned RegSize, 861 bool >>> &HasSizeMismatch) const override { 862 // rsp and rbp are the >>> only 64-bit registers the x86 backend can currently 863 // handle= =2E >>> 864 if (RegName.equals("rsp") || RegName.equals("rbp")) { >>> 865 // Check that the register size is 64-bit. >>> 866 HasSizeMismatch =3D RegSize !=3D 64; >>> 867 return true; >>> 868 } =20 >> >> Please try the attached patch. >=20 > Thanks for the patch! I gave it a quick try (not an extensive test), > and VirtualBox, compiled fully with clang, seems to work as usual. Committed (r450636), thanks! For more detailed information, please read the commit log. https://svnweb.freebsd.org/changeset/ports/450636 Jung-uk Kim --p078gD22HjDb8LmkwwT3pcKwb517hWKfx-- --2nm70CfCPXuLwQqmOidkbnURD84n3NHvx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEl1bqgKaRyqfWXu/CfJ+WJvzb8UYFAlnJelAACgkQfJ+WJvzb 8UYOCwf8DEXRczq1P/qfiV4+4JQ3Ji8kTc2djm7mOUQChnU8KauTvYaN3WWqjf+t nM2xtbhxQ7Iw/ANzm3BBWpsiooIKuoc2pELHGK4wLSQcgVC1eRKP1tCLKT5v3+Rm 1pbVX86/5RCjNcxl5H6c6Hifvnw4YgXCOBuPUu1rWvPZNVcMD/PE+gAgp75UVAAM LCCAFZoCPEA9AJO5jvww32r6B1Ehhb1uI1pd+LFkIxiGlxwIvtLqYzMda1xTCymk HdAblSt6e7J7WQ+7aFeafl1KEgMZISXWrDxLLpBZnewgFnQbKZB9IvclvnLJiI5t m+KTSnbPDOj2VZCmqPboGdiskCVvcA== =KWiT -----END PGP SIGNATURE----- --2nm70CfCPXuLwQqmOidkbnURD84n3NHvx--