[Mono-list] compiling mini with gcc 2.95.3

Paolo Molaro lupus@ximian.com
Thu, 5 Jun 2003 20:42:11 +0200


On 06/05/03 Chris Ferrell wrote:
> I'm curious if anybody has been able to successfully compile mini with
> gcc 2.95.3?  It appears that version of the compiler has a problem with

I compile with 3.2 and 2.95.4 regularly and it works fine.
I also test-compiled including cpu-pentium.h in a test program using gcc
2.7.2 and it was compiled ok.

> the big array in cpu-pentium.h #included into x86-mini.c.  It ends up
> giving some strange nonsensical error about the header file on line 3(look
> at my previous post regarding mini compile problems for the exact error).
> 
> Unfortunately, upgrading a compiler on most systems is a major pain
> because of the ABI issues.  I've done a workaround where I turn the
> cpu-pentium.h file into a .c file, add it to makefile.am where x86-mini.c
> is, and then put an extern reference in x86-mini.c

Does this simple program compile for you?
#define OP_LAST 3000
#define NULL (char*)0
#include "cpu-pentium.h"

int main () {
	return 0;
}

> It would be great if a workaround could be put into standard mini,
> but if not, I guess i'll be manually doing a workaround when doing a
> cvs update.

The workaround you described is a bit ugly. Maybe concatenating strings
together in cpu-pentium.h is what confuses the compiler?
Can you try changing genmdesc.c to generate single strings
and see if it works for you?

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better