[Ecls-list] Compiling .lsp files to .c, .h

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue May 17 12:42:00 UTC 2011

On Tue, May 17, 2011 at 11:32 AM, Denis Martinez
<deuns.martinez at 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

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)


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110517/d8c4f480/attachment.html>

More information about the ecl-devel mailing list