[f3064f]: porting-sbcl.lisp Maximize Restore History

Download this file

porting-sbcl.lisp    100 lines (96 with data), 4.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
(in-package :sbcl-page)
(define-page :porting "Porting" "porting" porting-page)
(defun porting-page ()
(list
(<h2> "Bootstrapping")
(<p> "Unlike most free software, SBCL can't bootstrap itself
directly from the gcc suite. Most of SBCL is written in Lisp, so it
requires an existing ANSI Common Lisp executable as a host for initial
bootstrapping. For most people, the problem is simply solvable by
downloading a precompiled SBCL binary and using that (either directly
or as a bootstrap host to build a more recent version from source). If
your needs are more exotic, see below or try asking on the mailing
lists, since more options may be possible.")
(<p> "Since SBCL 0.7.5, with Christophe Rhodes' work to port to
OpenMCL, SBCL's bootstrapping is expressed entirely in reasonably
portable ANSI Common Lisp (modulo a few fiddly bits like dependence on
IEEE arithmetic) so the bootstrap host need only be an ANSI
Common Lisp, not necessarily SBCL or a close relative. Possible hosts
include:"
(<ul>
(<li> "SBCL Itself")
(<li> "CMU Common Lisp")
(<li> "OpenMCL, depending on the version (0.14.1 works)")
(<li> "CLISP, depending on the version (2.33.2 has worked in the past)")
(<li> "Other CLs have not been tried or are not sufficiently
ANSI compliant (GCL)."))
"Also note that "
(<a href= "http://sbcl-internals.cliki.net/Build">
"cross-compilation is straightforward")
", so if you have access to any CPU/OS combination which runs one
of the \"works\" choices above it should be possible to bootstrap an
SBCL for your target. (See the "
(<a href= ,(page-link :ports)>
"platform support page")
" for information on which existing platforms SBCL runs on.)")
(<h2> "Ongoing Ports")
(<p>
"As of January 2007, the following ports are ongoing:"
(<ul>
(<li>
"Alastair Bridgewater's port to Microsoft Windows has
been merged into the CVS repository, but some of the facilities
available under UNIX Operating Systems (such as "
(<tt> "serve-event")
") are not supported under That Other Operating System.")
(<li> "Nathan Froyd has an almost-complete 64-bit port to the
Alpha; while SBCL is already supported on the Alpha, it acts as though
it were running on hardware with a 32-bit word size, rather than the
expected 64-bit word.")))
(<h2> "Other Ports")
(<p>
"In increasing order of estimated difficulty, the following
ports are possible:"
(<ul>
(<li>
"Porting to another UNIX-y OS, or extending SBCL's
coverage of an existing operating system to an existing processor port
(e.g. Solaris on x86-64, NetBSD on Sparc, Irix on MIPS, etc.)")
(<li> "Porting to a CPU supported by CMUCL but not by SBCL (the
only remaining such architecture seems to be HPPA, where we have a
dormant Linux/HPPA port with many bugs.)")
(<li> "Porting to a non-UNIX OS.")
(<li> "Extending an existing port to a 64-bit variant of that
CPU (e.g. 64-bit PowerPC, MIPS, SPARC, Alpha, or x86).")
(<li> "Porting to a new CPU from scratch."))
"All of these except the first are probably between a man-month
and a man-year for someone who already knows what he's doing. For
someone learning compilers or assembler or Lisp implementation
fundamentals or SBCL implementation idiosyncrasies or whatever as he
goes, it might take longer.")
(<p> "Porting to a reasonable Unix-y OS should take about a
man-week (consensus of Bill Newman and Dan Barlow after porting to
OpenBSD and LinuxPPC). Expect the iffy parts to be getting mmap() to
work right (finding absolute memory locations which can safely be
reserved for SBCL, and also possibly working around bugs in mmap()
itself) and figuring out how to extract the necessary register-level
information from sigcontexts. (Note that POSIX SA_SIGINFO-style signal
handling is part of the definition of \"reasonable\", since the
nightmarish CMU CL code which tried to work somehow under any old
signals implementation no matter how weird is gone in SBCL, and good
riddance.)")
(<p>
"SBCL has been ported to various CPU architectures by
reusing the work done for CMU CL. It should be possible to port it to
new CPU architectures, but it would be a lot of work: implementing all
the CPU-dependent parts of the compiler backend for the new CPU. If
you're interested in any CPU porting work, useful information might be
found on the "
(<a href= "http://ww.telent.net/sbcl-internals/">
"SBCL Internals CLiki")
" pages. You also might find help on the sbcl-devel mailing list
or (since the last ports to new CPU architectures were done before the
SBCL fork from CMU CL) on the cmucl-imp mailing list.")
(<p> "Porting work to Microsoft Windows and to 64-bit
architectures are ongoing. Please read the mailing lists for more
information about their current status.")))