<div dir="ltr"><div>I took a look, a month back, at the changes over there. Though it gave something to start, at that point in</div><div>time, I saw there were more things to work upon to be able to build VirtualBox using clang/LLVM </div><div>on Linux(Ubuntu) and resolve the dependencies with Qt. So, thereafter, I started my effort from scratch for this</div><div>independent effort of mine.</div><div><br></div>Eventually, as of now, I have been able to successfully build VirtualBox using clang/LLVM and bring it up<div>on Ubuntu 17.10 x86_64 with host clang-built kernel v4.16.3, along with Qt5.10.1</div><div>which as well I built using clang/LLVM for VirtualBox GUI. For that, I had to fix</div><div>a whole lot of issues around VirtualBox 5.2.8 and Qt 5.10.1. I will be sharing the report next.</div><div><br></div><div>Cheers.</div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 16, 2018 at 3:05 AM, Bernhard Fröhlich <span dir="ltr"><<a href="mailto:decke@bluelife.at" target="_blank">decke@bluelife.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, Mar 16, 2018 at 8:52 AM, Raghavan Santhanam<br>
<<a href="mailto:raghavanil4m@gmail.com">raghavanil4m@gmail.com</a>> wrote:<br>
> Hello All,<br>
><br>
> I wanted to know the feasibility of VirtualBox source to be built with<br>
> Clang/LLVM on Linux. As far as I researched, tried<br>
> and experimented so far, it turned out that there are many hard-coded<br>
> gcc/g++-specific Makefile variables, etc which I tried<br>
> to update beforehand via configure script. And also tried to work upon some<br>
> of the code that used non-standard VLAIS<br>
> that gcc supports as an extension but clang doesn't. With that, I was able<br>
> to some of the code with Clang/LLVM and still<br>
> there are some more to build that are likely to throw some more compilation<br>
> errors, etc due to gcc/clang extensions differences.<br>
> I also tried to reuse the MacOS/darwin settings(as an experiment) as it<br>
> seems to use Clang/LLVM as the compiler - but<br>
> appeared to require more effort than using Linux(OS) specific Makefile<br>
> settings to point to Clang/LLVM and get the build<br>
> going. So, before proceeding further, I wanted to know if there have been<br>
> attempts to build Virtualbox using Clang/LLVM<br>
> on Linux for Linux. I saw an old thread discussing about the same being<br>
> possible for FreeBSD. So, I tried to set the OS to<br>
> be FreeBSD and get going to see how far the build can go - it failed in the<br>
> first few steps when it didn't find some FreeBSD<br>
> specific settings which I had expected to happen as I am using Ubuntu 17.10<br>
> x86_64 as the host to build Virtualbox using<br>
> Clang/LLVM. So, any thoughts on this?<br>
><br>
> By the way, I was successful in building all of the Virtualbox kernel<br>
> modules(vboxpci, vboxnetadp, vboxnetfltm, vboxdrv),<br>
> using Clang/LLVM and they are completely working as expected as I verified<br>
> the same by running Ubuntu 17.10 x86_64<br>
> as the guest within the installed Virtualbox(v5.2.8) on the same host Ubuntu<br>
> 17.10 x86_64 I am using for the above<br>
> Clang/LLVM/Virtualbox/Linux building process. Below are the metadata<br>
> embedded within these kernel modules showing<br>
> the compiler used to build them to be Clang/LLVM along with the other<br>
> details of host and VirtualBox guest to give a<br>
> better context in this regard.<br>
><br>
> Cheers,<br>
> Raghavan Santhanam<br>
<br>
</div></div>Yeah, we are building (most parts) with clang on FreeBSD since around virtualbox<br>
4.3.10 so almost 4 years now. The commit back then which might give you a good<br>
summary of the changes is here:<br>
<br>
<a href="https://svnweb.freebsd.org/ports?view=revision&revision=349473" rel="noreferrer" target="_blank">https://svnweb.freebsd.org/<wbr>ports?view=revision&revision=<wbr>349473</a><br>
<br>
Beware that also includes patches that are not clang relevant.<br>
<span class="HOEnZb"><font color="#888888"><br>
-- <br>
Bernhard Fröhlich<br>
<a href="http://www.bluelife.at/" rel="noreferrer" target="_blank">http://www.bluelife.at/</a><br>
</font></span></blockquote></div><br></div></div></div>