[erlang-questions] has anyone cross compiled HiPE?

Andreas Schultz aschultz@REDACTED
Wed Feb 22 09:43:24 CET 2012


----- Original Message -----
> Hi,
> In short:
>   Q1: Has anyone already managed to cross-compile HiPE for ARM?

Not yet, but I might soon have to cross compile to MIPS. That
should present the same problems.

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

Just a wild guess, Erlang itself could be used during the build process.
If it tries to use the cross compiled version, it will certainly fail.
>   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.

You could try to setup a nativ compilation environment using QEMU.
Ubuntu and/or Debian should have some guides on that.

Some hints I found:

>       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?

Dipl. Inform.
Andreas Schultz

email: as@REDACTED
phone: +49-391-819099-224
mobil: +49-179-7654368

------------------ managed broadband access ------------------

Travelping GmbH               phone:           +49-391-8190990
Roentgenstr. 13               fax:           +49-391-819099299
D-39108 Magdeburg             email:       info@REDACTED
GERMANY                       web:   http://www.travelping.com

Company Registration: HRB21276 Handelsregistergericht Chemnitz
Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780

More information about the erlang-questions mailing list