[erlang-questions] has anyone cross compiled HiPE?

Matthias Lang matthias@REDACTED
Mon Feb 20 10:24:24 CET 2012


Hi,

In short:

  Q1: Has anyone already managed to cross-compile HiPE for ARM?

  Q2: Can someone give me a quick rundown as to how HiPE cross compilation
      is meant to work?

Expanding the questions:

  Q1: I just had a quick go at getting R15B to work on ARM. I have normal
      Erlang (i.e. no HiPE) running on ARM; I cross-compile it from an AMD64
      machine. Works fine.

      But if I try to enable hipe, i.e.

        ./otp_build configure --enable-hipe --xcomp-conf=../erl-xcomp-armle-linux-gnu.conf

      then the build bombs out partway through. It looks like it dies
      when it tries to execute the ARM version of 'hipe_mkliterals'.

      I could work around that, for instance by manually running
      hipe_mkliterals on an ARM. But if someone already knows how to
      get this going, then that'd be nice to know.

  Q2: I figure I need two things to make HiPE work on ARM.

      First, I need an emulator running on ARM with HiPE enabled. That's
      what Q1 is about.

      Second, I need to compile my Erlang code to ARM native code.
      I can't see an option to do that, i.e. if I use c(my_module, native)
      on my AMD64, I get an extra chunk in the .beam file called
      "HA64". I'm guessing that's AMD-64 specific code. So I need some
      way to tell HiPE that I want it to make ARM native code.

      (I've looked at TFM, specifically the HiPE App and the compile
      module page. Nothing there about generating code for specific
      targets. Maybe there's another page I've missed.)

Or is the sane way to get HiPE on ARM to start with a native ARM
toolchain?

Matt



More information about the erlang-questions mailing list