Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross compile mono for arm

Has anyone successfully cross-compiled mono for ARM under Linux without scratchbox or qemu?

(maybe with distcc or some cross-compiler toolchain)

like image 330
Gobliins Avatar asked Feb 10 '11 09:02

Gobliins


2 Answers

I managed to cross compile mono(2.0, 2.4, 2.6, 2.8, 2.10.1) with Scratchbox 2 installed on a Ubuntu machine using CodeSourcery Lite tool chain. I used the article from the Mono project page.

First compile it on the native machine

./configure
$ make
$ make install DESTDIR=path

Then in sb2:

[sbox-ARMEL: ~] > ./configure --disable-mcs-build
[sbox-ARMEL: ~] > make 
[sbox-ARMEL: ~] > make install DESTDIR=path

I use this for configuration

./configure --enable-minimal=profiler,debug,logging,soft_debug --with-tls=--with-tls=__thread --with-monotouch=no --without-mcs-docs --disable-mono-debugger CFLAGS=-DARM_FPU_NONE --disable-mcs-build
like image 93
retek4 Avatar answered Nov 18 '22 11:11

retek4


I tried and tried and tried with scratchbox2 last night.. Ran into some problem.. Ended up just compiling on arm, went fine! took 30 minutes!

CFLAGS=-DARM_FPU_VFP_HARD HardFloat
CFLAGS=-DARM_FPU_VFP_NONE SoftFloat

Compile mono on PC

sudo make install `directory like /tmptree etc`

move all these files from /tmptree over to / etc on your arm device.

./autogen.sh --disable-mcs-build
make CFLAGS=-DARM_FPU_VFP_HARD
sudo make install
sudo ldconfig

Mono Hard Float Patch

Tried doing Hard Float with mono 3.0.3.. it said it didn't support it yet.

like image 2
user1713462 Avatar answered Nov 18 '22 11:11

user1713462