[virtualbox-ose] Build failure: global register variable
Jung-uk Kim
jkim at FreeBSD.org
Mon Sep 25 21:51:21 UTC 2017
On 09/24/2017 21:06, soralx at 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-ose
>>> 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.
>>> 864 if (RegName.equals("rsp") || RegName.equals("rbp")) {
>>> 865 // Check that the register size is 64-bit.
>>> 866 HasSizeMismatch = RegSize != 64;
>>> 867 return true;
>>> 868 }
>>
>> Please try the attached patch.
>
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20170925/ca7847c5/attachment.sig>
More information about the freebsd-emulation
mailing list