1 ;;;; tags which are set during the build process and which end up in
2 ;;;; CL:*FEATURES* in the target SBCL, plus some comments about other
3 ;;;; CL:*FEATURES* tags which have special meaning to SBCL or which
4 ;;;; have a special conventional meaning
6 ;;;; Note that the recommended way to customize the features of a
7 ;;;; local build of SBCL is not to edit this file, but instead to
8 ;;;; tweak customize-target-features.lisp. E.g. you can use code like
11 ;;;; (flet ((enable (x) (pushnew x list))
12 ;;;; (disable (x) (setf list (remove x list))))
13 ;;;; #+nil (enable :sb-show)
14 ;;;; (enable :sb-after-xc-core)
15 ;;;; #+nil (disable :sb-doc)
17 ;;;; That way, because customize-target-features.lisp is in
18 ;;;; .cvsignore, your local changes will remain local even if you use
19 ;;;; "cvs diff" to submit patches to SBCL.
21 ;;;; This software is part of the SBCL system. See the README file for
22 ;;;; more information.
24 ;;;; This software is derived from the CMU CL system, which was
25 ;;;; written at Carnegie Mellon University and released into the
26 ;;;; public domain. The software is in the public domain and is
27 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
28 ;;;; files for more information.
32 ;; features present in all builds
37 ;; FIXME: Isn't there a :x3jsomething feature which we should set too?
42 ;; Douglas Thomas Crosher's conservative generational GC (the only one
43 ;; we currently support for X86)
46 ;; We're running under a UNIX. This is sort of redundant, and it was also
47 ;; sort of redundant under CMU CL, which we inherited it from: neither SBCL
48 ;; nor CMU CL supports anything but UNIX (and "technically not UNIX"es
49 ;; such as *BSD and Linux). But someday, maybe we might, and in that case
50 ;; we'd presumably remove this, so its presence conveys the information
51 ;; that the system isn't one which follows such a change.
55 ;; features present in this particular build
58 ;; Setting this enables the compilation of documentation strings
59 ;; from the system sources into the target Lisp executable.
60 ;; Traditional Common Lisp folk will want this option set.
61 ;; I (WHN) made it optional because I came to Common Lisp from
62 ;; C++ through Scheme, so I'm accustomed to asking
63 ;; Emacs about things that I'm curious about instead of asking
64 ;; the executable I'm running.
67 ;; Do regression and other tests when building the system. You
68 ;; might or might not want this if you're not a developer,
69 ;; depending on how paranoid you are. You probably do want it if
70 ;; you are a developer.
73 ;; :SB-PROPAGATE-FLOAT-TYPE and :SB-PROPAGATE-FUN-TYPE enable
74 ;; some numeric optimizer code in the target compiler. They
75 ;; correspond to the :PROPAGATE-FLOAT-TYPE and :PROPAGATE-FUN-TYPE
76 ;; features in the original CMU CL code, and while documentation
77 ;; existed for those, it seemed a little inconsistent. Despite the
78 ;; name, :SB-PROPAGATE-FLOAT-TYPE seems to control not only
79 ;; floating point optimizations, but some integer optimizations as
82 ;; CROSS-FLOAT-INFINITY-KLUDGE:
83 ;; * Even when these target features are enabled, the optimizations
84 ;; aren't enabled in the cross-compiler, because some of them
85 ;; depend on floating point infinities, which aren't in general
86 ;; supported on the cross-compilation host.
87 ;; * This is supported by hacking the features out of the
88 ;; *SHEBANG-FEATURES* list while we're building the cross-compiler.
89 ;; This is ugly and confusing and weird, but all the alternatives
90 ;; that I could think of seem messy and error-prone. That doesn't
91 ;; mean there's not a better way, though. Suggestions are welcome;
92 ;; or if you'd like to submit patches to make this code work
93 ;; without requiring floating point infinities, so that the entire
94 ;; problem goes away, that might be even better! -- WHN 2001-03-22
95 :sb-propagate-float-type
96 :sb-propagate-fun-type
98 ;; Make more debugging information available (for debugging SBCL
99 ;; itself). If you aren't hacking or troubleshooting SBCL itself,
100 ;; you probably don't want this set.
102 ;; At least two varieties of debugging information are enabled by this
104 ;; * SBCL is compiled with a higher level of OPTIMIZE DEBUG, so that
105 ;; the debugger can tell more about the state of the system.
106 ;; * Various code to print debugging messages, and similar debugging code,
107 ;; is compiled only when this feature is present.
109 ;; Note that the extra information recorded by the compiler at
110 ;; this higher level of OPTIMIZE DEBUG includes the source location
111 ;; forms. In order for the debugger to use this information, it has to
112 ;; re-READ the source file. In an ordinary installation of SBCL, this
113 ;; re-READing may not work very well, for either of two reasons:
114 ;; * The sources aren't present on the system in the same location that
115 ;; they were on the system where SBCL was compiled.
116 ;; * SBCL is using the standard readtable, without the added hackage
117 ;; which allows it to handle things like target features.
118 ;; If you want to be able to use the extra debugging information,
119 ;; therefore, be sure to keep the sources around, and run with the
120 ;; readtable configured so that the system sources can be read.
123 ;; Build SBCL with the old CMU CL low level debugger, "ldb". If
124 ;; are aren't messing with CMU CL at a very low level (e.g.
125 ;; trying to diagnose GC problems) you shouldn't need this.
128 ;; This isn't really a target Lisp feature at all, but controls
129 ;; whether the build process produces an after-xc.core file. This
130 ;; can be useful for shortening the edit/compile/debug cycle if
131 ;; you're messing around with low-level internals of the system,
132 ;; as in slam.sh. Otherwise you don't need it.
135 ;; Enable extra debugging output in the assem.lisp assembler/scheduler
136 ;; code. (This is the feature which was called :DEBUG in the
137 ;; original CMU CL code.)
140 ;; Setting this makes SBCL more "fluid", i.e. more amenable to
141 ;; modification at runtime, by suppressing various INLINE declarations,
142 ;; compiler macro definitions, FREEZE-TYPE declarations; and by
143 ;; suppressing various burning-our-ships-behind-us actions after
144 ;; initialization is complete; and so forth. This tends to clobber the
145 ;; performance of the system, so unless you have some special need for
146 ;; this when hacking SBCL itself, you don't want this set.
149 ;; Enable code for collecting statistics on usage of various operations,
150 ;; useful for performance tuning of the SBCL system itself. This code
151 ;; is probably pretty stale (having not been tested since the fork from
152 ;; base CMU CL) but might nonetheless be a useful starting point for
153 ;; anyone who wants to collect such statistics in the future.
156 ;; Peter Van Eynde's increase-bulletproofness code
158 ;; This is not maintained or tested in current SBCL, but I haven't
159 ;; gone out of my way to remove or break it, either.
162 ; :high-security-support
164 ;; multiprocessing support
166 ;; This is not maintained or tested in current SBCL. I haven't gone out
167 ;; of my way to break it, but since it's derived from an old version of
168 ;; CMU CL where multiprocessing was pretty shaky, it's likely to be very
170 ;; :MP enables multiprocessing
171 ;; :MP-I486 is used, only within the multiprocessing code, to control
172 ;; what seems to control processor-version-specific code. It's
173 ;; probably for 486 or later, i.e. could be set as long as
174 ;; you know you're not running on a 386, but it doesn't seem
175 ;; to be documented anywhere, so that's just a guess.
179 ;; This affects the definition of a lot of things in bignum.lisp. It
180 ;; doesn't seem to be documented anywhere what systems it might apply
181 ;; to. It doesn't seem to be needed for X86 systems anyway.
184 ;; This is probably true for some processor types, but not X86. It
185 ;; affects a lot of floating point code.
186 ; :negative-zero-is-not-zero
188 ;; It's unclear to me what this does (but it was enabled in the code
189 ;; that I picked up from Peter Van Eynde, called CONSTRAIN-FLOAT-TYPE
190 ;; instead of SB-CONSTRAIN-FLOAT-TYPE). -- WHN 19990224
191 :sb-constrain-float-type
193 ;; This is set in classic CMU CL, and presumably there it means
194 ;; that the floating point arithmetic implementation
195 ;; conforms to IEEE's standard. Here it definitely means that the
196 ;; floating point arithmetic implementation conforms to IEEE's standard.
197 ;; I (WHN 19990702) haven't tried to verify
198 ;; that it does conform, but it should at least mostly conform (because
199 ;; the underlying x86 hardware tries).
202 ;; This seems to be the pre-GENCGC garbage collector for CMU CL, which was
203 ;; AFAIK never supported for the X86.
206 ;; CMU CL had, and we inherited, code to support 80-bit LONG-FLOAT on the x86
207 ;; architecture. Nothing has been done to actively destroy the long float
208 ;; support, but it hasn't been thoroughly maintained, and needs at least
209 ;; some maintenance before it will work. (E.g. the LONG-FLOAT-only parts of
210 ;; genesis are still implemented in terms of unportable CMU CL functions
211 ;; which are not longer available at genesis time in SBCL.) A deeper
212 ;; problem is SBCL's bootstrap process implicitly assumes that the
213 ;; cross-compilation host will be able to make the same distinctions
214 ;; between floating point types that it does. This assumption is
215 ;; fundamentally sleazy, even though in practice it's unlikely to break down
216 ;; w.r.t. distinguishing SINGLE-FLOAT from DOUBLE-FLOAT; it's much more
217 ;; likely to break down w.r.t. distinguishing DOUBLE-FLOAT from LONG-FLOAT.
218 ;; Still it's likely to be quite doable to get LONG-FLOAT support working
219 ;; again, if anyone's sufficiently motivated.
223 ;; miscellaneous notes on other things which could have special significance
224 ;; in the *FEATURES* list
227 ;; notes on the :NIL and :IGNORE features:
229 ;; #+NIL is used to comment out forms. Occasionally #+IGNORE is used
230 ;; for this too. So don't use :NIL or :IGNORE as the names of features..
232 ;; notes on :SB-XC and :SB-XC-HOST features (which aren't controlled by this
233 ;; file, but are instead temporarily pushed onto *FEATURES* or
234 ;; *TARGET-FEATURES* during some phases of cross-compilation):
236 ;; :SB-XC-HOST stands for "cross-compilation host" and is in *FEATURES*
237 ;; during the first phase of cross-compilation bootstrapping, when the
238 ;; host Lisp is being used to compile the cross-compiler.
240 ;; :SB-XC stands for "cross compiler", and is in *FEATURES* during the second
241 ;; phase of cross-compilation bootstrapping, when the cross-compiler is
242 ;; being used to create the first target Lisp.
244 ;; notes on the :SB-ASSEMBLING feature (which isn't controlled by
247 ;; This is a flag for whether we're in the assembler. It's
248 ;; temporarily pushed onto the *FEATURES* list in the setup for
249 ;; the ASSEMBLE-FILE function. It would be a bad idea
250 ;; to use it as a name for a permanent feature.
252 ;; notes on local features (which are set automatically by the
253 ;; configuration script, and should not be set here unless you
254 ;; really, really know what you're doing):
256 ;; machine architecture features:
258 ;; any Intel 386 or better, or compatibles like the AMD K6 or K7
260 ;; DEC/Compaq Alpha CPU
261 ;; (No other CPUs are supported by SBCL as of 0.6.12.15, but SPARC or
262 ;; PowerPC support could be ported from CMU CL if anyone is
263 ;; sufficiently motivated to do so, or if you're *really* motivated,
264 ;; you could write a port from scratch for a new CPU architecture.)
265 ;; (CMU CL also had a :pentium feature, which affected the definition
266 ;; of some floating point vops. It was present but not enabled or
267 ;; documented in the CMU CL code that SBCL is derived from, and is
268 ;; present but stale in SBCL as of 0.6.12.)
270 ;; operating system features:
271 ;; :linux = We're intended to run under some version of Linux.
272 ;; :bsd = We're intended to run under some version of BSD Unix. (This
273 ;; is not exclusive with the features which indicate which
274 ;; particular version of BSD we're intended to run under.)
275 ;; :freebsd = We're intended to run under FreeBSD.
276 ;; :openbsd = We're intended to run under FreeBSD.
277 ;; (No others are supported by SBCL as of 0.6.7, but :hpux or
278 ;; :solaris support could be ported from CMU CL if anyone is
279 ;; sufficiently motivated to do so, and it'd even be possible,
280 ;; though harder, to port the system to Microsoft Windows.)