On Tue, May 17, 2011 at 11:32 AM, Denis Martinez <deuns.martinez@gmail.com> wrote:
I am attempting to create a shared library out of lsp files, in a cross-compiler situation where I use the host ecl with a foreign compiler. I guess I have two options:
1) make ecl -compile use the cross-compiler
2) extract .c, .h out of lsp files and compile the files normally
At first look 1) is not possible and 2) appears doable, but I have not yet found how to do it. Can someone explain ?

Is the C code compiled for the same platform ECL runs in, or for a different one?

The problem right now is that ECL's compiler uses information that is hardcoded in the runtime to take decisions about the generated C code. Thus, the code generated for a given platform can only be reliably produced by an ECL built for that same platform, which is why the possibility of cross-compiling ECL exists.

If the target compiler and the original ECL are built for the operating system then you do not need to go through such complicated paths and it typically suffices to change the compiler name c::*cc* and other special variables which are internal to the compiler (see cmp/cmpdefs.lsp to find out the names)

Juanjo

--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com