[erlang-questions] small build
Matthias Lang
matthias@REDACTED
Thu Apr 17 20:08:13 CEST 2008
Steve Vinoski writes:
> One other question: where can I learn more about cross-compilation?
Cross-compiling in general: I vaguely recall reading a GNU guide to
cross compiling, but I can't find it now. Maybe it's part of the
autotools manual. I also recall feeling more confused after reading it
than before.
Cross-compiling Erlang specifically:
http://www.trapexit.org/Cross_compiling
I haven't updated that note for R12B. It wouldn't surprise me if there
were some new hurdles.
> Not sure if this qualifies as "real" cross-compilation, but I'm trying
> to get a 64-bit x86_64 Redhat Linux box to build for a 32-bit i686
> Linux system, and either I'm doing something wrong or it's not easy.
> After much trial and error I've ended up running configure like this
> (using the bash shell):
>
> $ CC='gcc -m32' LD='gcc -m32' ./configure [other options]
> --build=i686-redhat-linux-gnu
>
> and then running make like this:
>
> $ TARGET=i686-redhat-linux-gnu make
>
> which kind of sort of seems to work -- this didn't seem to work with
> R11B-5, specifically for hipe, but it does appear to work with R12B-2.
That all looks right.
I haven't tried to get HIPE to work for my target, it'd be pointless
anyway since HIPE has no MIPS backend. Besides, our code is fast enough.
(More generally, I'd just take the path of least resistance and find a
32-bit machine to compile on. But you probably have reasons. Comparing
the config.h files to the ones made on a 32-bit system would be prudent.)
Matt
More information about the erlang-questions
mailing list