axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Axiom-developer] RE: cross-compiling Axiom


From: Bill Page
Subject: RE: [Axiom-developer] RE: cross-compiling Axiom
Date: Mon, 4 Sep 2006 22:22:35 -0400

On September 4, 2006 5:13 AM Gabriel Dos Reis wrote:
> 
> On Sun, 3 Sep 2006, C Y wrote:
> 
> | Gaby, just for my own information:
> |
> | Is this issue similar to (say) compiling CMUCL or SBCL for a
> | new platform, working from a current one?
> 
> In essence, it is similar.
> 
> I never looked at SBCL before you mentioned it in this thread.
> I briefly browsed their website and the description of their build
> process.  They claim cross-compilation of SBCL is straightforward
> 
>       http://www.sbcl.org/porting.html
> 
> I rest my case.  (Or maybe they don't know how Lisp works :-)
>

Or maybe they don't even know what cross-compilation is? ;) Did you
read the description of the SBCL "cross-compilation" process?

http://sbcl-internals.cliki.net/Build

Even the first line on the page Gaby quoted above says:

"Unlike most free software, SBCL can't bootstrap itself directly
from the gcc suite."

So all the rest that follows is related to this feature of SBCL. In
contrast, GCL *can* be built directly given gcc and continues to
depend on gcc even after it is built. In that sense GCL is just an
extension of gcc. So if the SBCL definition of cross-compile is
allowed, then of course both GCL and Axiom can be "cross-compiled".
All we have to do is first cross-compile gcc for the target system.
Then we just proceed to build GCL on the target system as we would
any other system (as is done on Debian for example).

Notice the steps under "Cross-Compiling" on the SBCL page look more
like Tim's description of "Cross-Mounting" than cross-compiling.
The final SBCL binary is built on the target system through a
standard lisp 'save-system' command - *not* on the host.

http://sbcl-internals.cliki.net/make-target-2

So it is clear that SBCL can not be cross-compiled in the sense
of simply specifying a target different from the host system on
the ./configure command.
 
> [...]
> 
> | I would have thought if GCL was able to do this then Axiom
> | probably would be able to too, give or take the non-lisp parts
> | of the system - am I missing something?
> 
> I don't think you are missing anything.  I don't believe the current
> build of GCL can be subject to cross-compilation -- from reading
> its makefile.

Most of GCL is written in C. It does not require an existing ANSI
Common Lisp executable as a host for initial bootstrapping the way
SBCL does. So "cross-compiling" GCL is actually easier than in the
case of SBCL.

If what SBCL does is cross-compiling than it seems that we have
simply been arguing over semantics (the same words used differently)
and not a real problem. :(

On the other hand I would prefer to use the term 'cross-compile"
in a more standard manner, to refer to the case where the final
target code is created on the host system.

> 
> For the type of work I'm doing, we don't need the Axiom compiler
> as a cross-compiler -- it would remain native.  We want it to be
> cross-compiled.
> 

Since the Axiom compiler is written in Lisp and BOOT, and BOOT
compiles to Lisp, and GCL compiles Lisp to C, and GCL is
written in C and is compiled with gcc, and gcc can be cross-
compiled ... what is the problem?

> 
> | Or is GCL in fact not able to be distributed for similar
> | reasons?
> 
> I don't know; Camm may have more answers here.
> It certainly does not come with the Linux version I use.
> 
> | I would be interested to know how Maxima fairs in this
> | situation.
> 
> maxima does not come with the distro I used -- I don't know for
> RH. But, isn't Maxima capable of using a lisp implementation 
> other than GCL?
>

These days Maxima is usually built using Clisp, but GCL is still
an option of the configure. Clisp is at included in the Fedora
Linux distribution (extras). Debian includes both Clisp and GCL.

Clisp uses a byte-code interpreter. It does not compile to object
code on the target machine, so cross-compilation should not be
much of an issue, but I was not able to find anything in the Clisp
documentation that suggests that ./configure actually supports
cross-compilation, i.e. creating a binary for target system
different than the host.

It is also not clear to me from the maxima ./configure options
if the Maxima build can compile Clisp byte-code intended for
use on a target system different from the host. Has anyone tried
this? E.g. Successfully building a version of Maxima for Sparc
hardware on an i386 Linux system?

Regards,
Bill Page. 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]