[m-users.] ARM Linux toolchain

Julien Fischer jfischer at opturion.com
Mon Feb 15 09:03:41 AEDT 2016

Hi Valdimir,

On Sun, 14 Feb 2016, Vladimir Komendantskiy wrote:

> Julien's solution worked well for me. I think it can be formalised in
> a script as a kind of stage 1 compiler (targeting the host arch).

I have been thinking about how to do this: we could have a new script in
tools, (e.g. tools/configure_arm_linux_cross) and then add a new option
to the configure script, --with-host-execs, which would cause it to
install the executables from the host system rather than build them from
the target system.  The new option may as well disable compilation of
the target executables as well since in that scenario all we care about
is the libraries.

> Incidentally, as well as compiler_mercury_compiler, there is at least
> mfilterjavac/mfilterjavac that has to be built for the host
> architecture on stage 1.

True, although it's only significant if you wish your cross-compiler to
able to compile things in the java grade.  However, since it's Java
you may as well just compile on the host system and copy the .jars


> An issue with the compiled binaries is their size (above 1M at least).
> Is the binary size similar with the Mingw cross-compiler? Is it
> supposed to be improved by manual assignment of config variables?

They are probably statically linked, against the Mercury libraries if
not the system ones.  Try compiling with "--mercury-linkage shared".


More information about the users mailing list