title: Cross compiling Mono framework 3.0.6+ for MIPS
body: <p>I am trying to cross-compile Mono framework (3.0.6) for MIPS platform. There are few issues I have found so I would like to ask the community whether there are known or not.</p>
  <p><strong>My environment</strong>: 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</p>
  <p><strong>Toolchain</strong>: Sourcery G++ Lite 4.3-51</p>
  <p><strong>command-line</strong>:</p>
  <blockquote>
  <p>./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=&quot;-mips32r2 -march=24kf -mtune=24kf -EL&quot; CFLAGS=&quot;-mips32r2 -march=24kf -mtune=24kf -EL&quot; &amp;&amp; make</p>
  </blockquote>
  <p><strong>Issue #1</strong>:
  When I managed it to configure, compilation stopped with the following error:</p>
  <blockquote>
  <p>mini-gc.c:2551: error: redefinition of 'mini_gc_enable_gc_maps_for_aot'</p>
  <p>mini-gc.c:2518: error: previous definition of 'mini_gc_enable_gc_maps_for_aot' was here</p>
  </blockquote>
  <p><strong>Issue #2</strong>:
  After I commented out the second declaration of <strong>mini_gc_enable_gc_maps_for_aot</strong> it compiled but looks like Sourcery G++ linker crashed:</p>
  <blockquote>
  <p>/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</p>
  </blockquote>
  <p>Could anyone led some light to this problem? I failed to find any articles/info describing building Mono for MIPS architecture (at least some recent information). According to <a href="http://www.infoq.com/news/2012/02/Mono-Android-MIPS" rel="nofollow noreferrer">this</a> link, support for MIPS was added about a year ago. Mono itself should fully support MIPS since <a href="http://www.mono-project.com/Release_Notes_Mono_3.0.6#MIPS_port" rel="nofollow noreferrer">3.0.4 version</a>.</p>