Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

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

Download this file

porting-sbcl.lisp    96 lines (93 with data), 5.3 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
(define-page :porting "Porting SBCL" "porting" porting-page)
(defun porting-page ()
`((:|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 soluble 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, anyway) 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 works)")
(:|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 August 2004, the following ports are ongoing:"
(:|ul|
(:|li| "Alastair Bridgewater's port to Microsoft Windows has
gotten as far as a " ((:|a| :|href|
"http://www.dridus.com/~nyef/sbcl-on-win32.png") "command prompt in
warm init")
" and is struggling with various nonUnixisms in That Other Operating
System, notably the way SBCL expects errors to be handled by signals.")
(:|li| "As RAM has gotten cheaper, people with large problems
have gotten more frustrated with 32-bit address spaces, and besides a
Windows port, a 64-bit port is a hardy perennial conversation
topic. Exploratory technical work has been done on the Alpha platform,
with some success but not (as of September 2003) a fully-working
system. Nathan Froyd has been working on finishing the Alpha 64-bit
work, and Dan Barlow has started an AMD 64-bit port.")
(:|li| "Brian Mastenbrook has started work on a port to IRIX.")
(:|li| "Lars Brinkhoff is working on an ARM backend to SBCL,
with unknown status.")))
(:|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. Darwin or Solaris on x86, NetBSD on PowerPC, 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 Microsoft Windows or another 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.")))