[Nestedvm] building nestedvm with gcc 4.x

Charles Oliver Nutter headius at headius.com
Thu May 6 14:11:23 EDT 2010


Wow, this sounds like a great find. I have been staying off NestedVM
hackery because I didn't want to futz with getting an older GCC
installed (I'm on OS X).

As it happens, the other machine I have access to is Ubuntu :)

What system are you on? Maybe you can post updated instructions (w/
patch) for getting the cross-compiler built?

On Thu, May 6, 2010 at 12:09 PM, Simmons, Aaron
<asimmons at rosettastone.com> wrote:
> As mentioned earlier, trying to build the C++ part of nestedvm (make cxxtest) with gcc 4.x will fail with this error:
>        ../../gcc-3.3.6/gcc/f/com.c:11080: error: conflicting types for 'ffecom_gfrt_basictype'
>        ../../gcc-3.3.6/gcc/f/com.h:236: error: previous declaration of 'ffecom_gfrt_basictype' was here
>
> The workaround has been to use gcc 3.3.6, which can be painful on systems where its unavailable (newer Ubuntu or any recent Mac OS X).
>
> However, I've figured out a workaround that allows gcc 4.x to be used.  It turns out the error is coming from a bona-fide bug in the gcc 3.3.6 code: the function prototype for "ffecom_gfrt_basictype" is different in com.h than it is in com.c.  (It looks like a copy-paste bug for the nearby function "ffecom_gfrt_kindtype".)  Apparently old versions of gcc would let this kind of prototype mismatching slide, whereas gcc 4.x enforces it.  Anyway, the fix is to simply make the prototype of "ffecom_gfrt_basictype" in com.h match the function in com.c.  Then the rest of it compiles and works!
>
> I'm attaching a patchfile that implements the fix.  I think it would be a good idea to have the nestedvm build process apply this patch to gcc before it builds it.  This will allow nestedvm to be used on many newer platforms. :)
>
>
> Thanks,
> aaron
>
>
> _______________________________________________
> Nestedvm mailing list
> Nestedvm at lists.hcoop.net
> https://lists.hcoop.net/listinfo/nestedvm
>
>



More information about the Nestedvm mailing list