为MIPS交叉编译Mono框架3.0.6+

4
我正在尝试为MIPS平台交叉编译Mono框架(3.0.6)。我发现了一些问题,因此我想问问社区是否已知道这些问题。 我的环境:Linux 3.2.0-39-generic #62-Ubuntu SMP Thu Feb 28 00:28:53 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux 工具链:Sourcery G++ Lite 4.3-51 命令行
./configure --prefix=/home/dev/mono-3.0.6-mips --host=mips-linux-gnu --enable-minimal=profiler,debug,logging,soft_debug --without-mcs-docs --target=mips-linux-gnu --with-moonlight=no --with-tls=pthread --with-sigaltstack=no --with-profile4_5=yes CXXFLAGS="-mips32r2 -march=24kf -mtune=24kf -EL" CFLAGS="-mips32r2 -march=24kf -mtune=24kf -EL" && make

问题 #1: 当我配置后,编译停止并出现以下错误:

mini-gc.c:2551: error: redefinition of 'mini_gc_enable_gc_maps_for_aot'

mini-gc.c:2518: error: previous definition of 'mini_gc_enable_gc_maps_for_aot' was here

问题 #2: 在我注释掉第二次声明的mini_gc_enable_gc_maps_for_aot之后,它编译了,但看起来像是Sourcery G++链接器崩溃了:

/home/dev/mips-4.3/bin/../lib/gcc/mips-linux-gnu/4.3.2/../../../../mips-linux-gnu/bin/ld: BFD (Sourcery G++ Lite 4.3-51) 2.18.50.20080215 assertion fail /scratch/clm/2008q3-lite/obj/binutils-src-4.3-51-mips-linux-gnu-i686-pc-linux-gnu/bfd/elfxx-mips.c:2651

有人能为这个问题提供一些帮助吗?我找不到任何关于在MIPS架构上构建Mono的文章/信息(至少是一些最近的信息)。根据this链接,大约一年前添加了对MIPS的支持。自3.0.4版本以来,Mono本身应该完全支持MIPS。

1个回答

5
我为那些将面临相同问题的人发布这个信息(构建MIPS平台的Mono):
最终,我使用以下命令行成功地为MIPS平台构建了Mono运行时:
./configure --prefix=/home/dev/mono-3.0.6-mips --host=mips-linux-gnu --enable-minimal=profiler,debug,logging,soft_debug --without-mcs-docs --target=mips-linux-gnu --with-moonlight=no --with-tls=pthread --with-sigaltstack=no --with-profile4_5=yes CXXFLAGS="-mips32r2 -EL" CFLAGS="-mips32r2 -EL" LDFLAGS=-EL CPPFLAGS="-mips32r2 -EL" ASFLAGS=-EL CC="mips-linux-gnu-gcc -EL"
对于所有工具指定-EL标志解决了使用ld链接mono的问题(请参见我的初始帖子中的问题#2)。
剩下的最后一个问题是使mono构建系统构建mscorlib.dll。在mcs/class文件夹内调用不同的make命令没有任何作用。

谢谢!我刚遇到同样的问题,这很有帮助! - inbaly

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接