On Mon, 4 Sep 2006, Bill Page wrote: | 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? ;)
Huh?!? | Did you | read the description of the SBCL "cross-compilation" process? *Yes*. | 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." Yes, that does not preclude cross-compilation. You see, GCC for example, can no longuer be bootstrapped with a K&R C compiler. You need an ANSI C compiler to bootstrap GCC, just like you need a LISP compiler to bootstrap SBCL. The (in)ability of bootstrapping from GCC does not constitute a criteria of cross-compilation. However, it may be an issue in the context of GNU toolchain. | 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. The question is not whether GCL can be built directly given gcc, but whether GCL can be cross-compiled in the context of GNU toolchain. If GCL claims to be the official GNU implementation of Common Lisp, then we better find a way to get there. Exactly what are you disputing now? That Lisp cannot be cross-compiled? Or that SBCL cannot be cross-compiled or that that cross-compilation must consist of ./configure --target=...? That is important to know, because it is no longer clear to me what you're driving at. Take GCC for example, you CANNOT cross-compile it if you do not have the binutils binaries for the target system. That is a pretty much a basic requirement -- similar to SBSL requiring a sufficiently ANSI-compliant Lisp to start up. Furthermore, if you want to bootstrap GCC on a platform (say HPUX) lacking an ANSI C compiler, you need at least a binary of GCC for that platform. I don't see that situation different from SBCL requiring a LISP compiler to start up bootstrap. | In that sense GCL is just an extension of gcc. LOL. In that sense, the whole world is an extension of GCC. But, again, being an extension of GCC is not the issue at hand. Many software are extension of GCC (in your sense), still fare better with cross-compilation. I suspect being an extension of GCC is not a sufficient condition. | 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. Yes, but that is still insufficient. We need to do more work to get to cross-compilation with the GNU toolchain -- that is all that counts if we ever want Axiom (based on GCL) shipped with linux distros. | Then we just proceed to build GCL on the target system as we would | any other system (as is done on Debian for example). Yes, we *just*. Except that at the moment, we don't make sure that will work in a cross-compilation context with the GNU toolchain. I tried yesterday afternoon with no luck :-( | 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. yes; who asked you to save GCL image on the host? This is situation is no different from what we (speaking of GCC) are used to when we have to regression-test GCC on different architecture (which include *bootstrapping* a cross-compiled compiler and *use* it) when we don't have access to the target. http://gcc.gnu.org/simtest-howto.html My question is very simple: Can I set up an environment like that that let cross-compile GCL? The asnwer at the moment is NO. Can it be done. The answer is YES. Do I need cross-mounting? I think NO. No matter how much you deny cross-compilation of Lisp. [...] | > | 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. Huh?!? | 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. :( what SBCL does is cross-compilation. I don't believe I have been arguing over semantics. I do have a fundamental issue. How do I get Axiom (and therefore GCL) to support cross-compilation in the context of GNU toolchain. First, you have suggested that anyone thinking of cross-compiling GCL does not understand Lsip. When offered compeling Lisp-based system supporting cross-compilation, you are that | 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. *which* final code? | > 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? is that supposed to be an existential proof? Sorry, I've little time for quibbling. If you believe Axiom in its current form supports cross-compilation in the GNU toolchain context, please work out precisely th details for me. That would sve me lot of work. Otherwise, help me with more constructive proofs. Here is an idea of what it takes to cross-compile GCC, for example http://linux.bytesex.org/cross-compiler.html (or course, I could have given you the link to Dan Kegel's more elaborated and complete crosstool suite, but I prefer the above link for its simplicity at exposing the core issues. Please, again have a look at the description of how SBCL achieves cross-compilation. -- Gaby _______________________________________________ Axiom-developer mailing list Axiom-developer@nongnu.org http://lists.nongnu.org/mailman/listinfo/axiom-developer