Cross-compiling mono for proprietary ARM device

久未见 提交于 2019-11-27 06:18:51

问题


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?


回答1:


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).



来源:https://stackoverflow.com/questions/11331251/cross-compiling-mono-for-proprietary-arm-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!