tech-pkg archive

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

Re: TOOL_DEPENDS



> Date: Thu, 01 Aug 2024 13:23:26 +0100
> From: Robert Swindells <rjs%fdy2.co.uk@localhost>
> 
> Taylor R Campbell <campbell+netbsd-tech-pkg%mumble.net@localhost> wrote:
> >
> > lang/sbcl is a Common Lisp implementation (view it as a compiler
> > toolchain for our purposes), which does things in two stages:
> >
> > 1. builds itself using some choice of host toolchain as a bootstrap
> >   (ecl, clisp, abcl, or existing sbcl)
> >
> > 2. builds itself with itself
> 
> It does not do this. SBCL only gets built once by the package, using
> whichever host Common Lisp toolchain you specify.

That is what SBCL does when you run make.sh.  You can see this by
digging into the series of shell scripts

make-host-1.sh
make-target-1.sh
make-host-2.sh
make-target-2.sh

inside SBCL that make.sh runs, or by reviewing the paper
<https://research.gold.ac.uk/id/eprint/2336/1/sbcl.pdf> on its design:

   The first step involves using the host compiler [such as ECL] to
   compile and load SBCL's source files, which produces a
   cross-compiler (denoted by xc) running as an application inside the
   host.
   [...]
   Next, the cross-compiler version of compile-file is used to compile
   the SBCL sources again [...]

> There is no dependency on the host toolchain once it has been built.

And that is _because_ SBCL uses the two-stage process I just
described.

If it were simply a matter of using ECL to build SBCL as an ECL
application, it would presumably wind up with a library dependency on
libecl.so.  But the SBCL-as-ECL-application is only an intermediate
step in SBCL's own build process to make SBCL-as-an-SBCL-application.


Home | Main Index | Thread Index | Old Index