[Mono-list] Tried building mono-0.11 on StrongARM

Jeff Steele jsteele@ColoradoCollege.edu
26 Apr 2002 11:36:44 -0600


Hi,

	I'm really excited about mono so I tried something a litle
goofy : I built it on a Strongarm platform.  I *know* this isn't the
highest priority right now, but just for kicks, here's what I did :

./configure :
I added "armv4l" as a target

         arm-*-linux-* | armv4l-*-linux-*) TARGET=ARM; arch_target=arm; ACCESS_UNALIGNED="no";;
                       ^^^^^^^^^^^^^^^^^^
./arch/arm/tramp.c :  
I removed mono_string_new_wrapper(), since it is defined elsewhere,
and I was getting conflicts

./io-layer/atomic.c :
I removed the spinlocks.  This is a hack : pthreads doesn't have the
spinlock calls on ARM, multi-cpus not supported. Should the atomic 
routines be coded in assembly ?  Does it matter ?

RESULTS :

After these hacks, I did configure, make, make install.  Lots and lots
of the following :

         warning: cast increases required alignment of target type

as well as some :


	 warning: comparison is always false due to limited range of data type

Q : I *think* the first one is just warning about wasted space, since
4-byte words must be aligned on 4-byte boundaries.  Is this true ?

Anyway, monodis and monograph work fine (as far as I can tell).  I
then tried :

      mint --trace hello.exe

and I got the following :

>  
>    (1024) Entering System.Threading.Thread::.cctor ()
>      (1024) Entering System.Collections.Hashtable::.cctor ()
>        (1024) Entering System.Object::.ctor (0x20bd938 )
>        (1024) Leaving System.Object::.ctor => 
>        (1024) Entering System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray ([0x20c16b8] [vt: 0xbffff7b8] )
>  0x20c3038:	e1a0c00d	mov	ip, sp
>  0x20c303c:	e92d50f0	stmdb	sp!, {r4-r7, ip, lr}
>  0x20c3040:	e1a04000	mov	r4, a1
>  0x20c3044:	e1a07003	mov	r7, a4
>  0x20c3048:	e597100c	ldr	a2, [r7, #12]
>  0x20c304c:	e5970000	ldr	a1, [r7, #0]
>  0x20c3050:	e1a0e00f	mov	lr, pc
>  0x20c3054:	e1a0f004	mov	pc, r4
>  0x20c3058:	e89da0f0	ldmia	sp, {r4-r7, sp, pc}
>  Segmentation fault


So it seems that the very first method that actually does something is
crashing.  I'm a little (?) too clueless to debug this situation, but
my question is :

Q: Should mint be close to running on the StrongARM (or any ARM) or is
there still lots of work to be done ?

If there is a simple fix to get mint working, I'd love to hear about
it.

Thanks,
	Jeff