[erlang-questions] Yet another cross-compilation question

Mikael Pettersson <>
Mon Dec 22 00:26:28 CET 2008


Mark Scandariato writes:
 > >  > beam/beam_emu.c: In function 'process_main':
 > >  > beam/beam_emu.c:4875: internal compiler error: in redirect_branch_edge,
 > > at
 > >  > cfgrtl.c:942
 > >  >
 > >  > gcc is version 4.1.1
 > >  >
 > >  > Any suggestions (other than get a newer/older compiler)? Is this a known
 > >  > problem with gcc 4.1.1?
 > >
 > > This very clearly is a gcc bug. gcc-4.1.1 is fairly old, you should try
 > > something newer. I don't recall seeing anything like this problem on any
 > > other platform, so chances are it's a Microblaze-specific bug.
 > 
 > 
 > Until (if?) I can get a newer version of gcc for microblaze, how horrible
 > would it be to compile beam_emu.c without any optimization? (It does compile
 > without optimization.)

It would be quite horrible. beam_emu.c is the central interpreter for
the BEAM virtual machine code that Erlang compiles to. And unless your
application code is simple glue around expensive BIFs (like ets tables or
message sends) you're going to spend most of your time in the interpreter.

(There's also a native code compiler for Erlang but it's not an option
for you since it doesn't support Microblaze.)



More information about the erlang-questions mailing list