4

Currently at work, we are developing software for some arm-elf little endian devices. We are currently doing this in plain C, which is a pain. Luckily for us the company who creates the devices provide c++ support, unfortunatly that same company has messed up the c++ libraries so the project fails at linker-stage of compilation, yay!

So lately i've been looking at alternatives, and the most interesting alternative is mono. I can see that compiling mono for arm is mostly done in scratchbox, and this seems like a good alternative. But i can also see that i need to setup rootfs that resembles my device... However, i have no way of finding out what the rootfs is on my device, becouse i cannot connect to it in any way. Will this make it impossible to compile mono using scratchbox? If so, is there another way i can compile mono?

Robin Heggelund Hansen
  • 4,906
  • 6
  • 37
  • 54
  • 1
    If your platform's c++ support is broken you wont be able to build mono for it ( a large proportion of the core is c++ ) – IanNorton Jul 04 '12 at 22:58
  • The cpp support isn't broken, the C++ api is. So while we have no problem writing C++ programs, we have no way to utilize the C++ api. (this is a problem as we have 80.000 SLOC of C). – Robin Heggelund Hansen Jul 05 '12 at 05:55
  • possible duplicate of [Cross compile mono for arm](http://stackoverflow.com/questions/4955314/cross-compile-mono-for-arm) – user2284570 Jul 08 '14 at 12:08

1 Answers1

2

You can cross-compile with the usual configure support, something like this:

CC=arm-linux-yourabi-gcc CFLAGS="-march=armv7-a -mfloat-abi=softfp" -DARM_FPU_VFP=1 ./configure --host=arm-linux-yourabi --disable-mcs-build

Of course you need to adjust for your device ABI and floating point support. --disable-mcs-build is needed because you can't run the cross-compiled mono on your system: you can build the class libraries and C# code in a separate tree on your devel box and just copy them to the target.

Also, contrary to what IanNorton writes in the comments, the mono runtime in written in C (there is only a very small binding to llvm in C++, which is not essential, not in the default build and definitely not useful for your setup).

lupus
  • 3,963
  • 1
  • 18
  • 13