primarily intending to integrate Colin Walter's O(N) map code and
[sbcl.git] / base-target-features.lisp-expr
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
5
6 ;;;; This software is part of the SBCL system. See the README file for
7 ;;;; more information.
8 ;;;;
9 ;;;; This software is derived from the CMU CL system, which was
10 ;;;; written at Carnegie Mellon University and released into the
11 ;;;; public domain. The software is in the public domain and is
12 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
13 ;;;; files for more information.
14
15 (
16  ;;
17  ;; features present in all builds
18  ;;
19
20  ;; our standard
21  :ansi-cl :common-lisp
22  ;; FIXME: Isn't there a :x3jsomething feature which we should set too?
23
24  ;; our dialect
25  :sbcl
26
27  ;; Douglas Thomas Crosher's conservative generational GC (the only one
28  ;; we currently support)
29  :gencgc
30
31  ;; We're running under a UNIX. This is sort of redundant, and it was also
32  ;; sort of redundant under CMU CL, which we inherited it from: neither SBCL
33  ;; nor CMU CL supports anything but UNIX (and "technically not UNIX"es
34  ;; such as *BSD and Linux). But someday, maybe we might, and in that case
35  ;; we'd presumably remove this, so its presence conveys the information
36  ;; that the system isn't one which follows such a change.
37  :unix
38
39  ;;
40  ;; features present in this particular build
41  ;;
42
43  ;; Setting this enables the compilation of documentation strings
44  ;; from the system sources into the target Lisp executable.
45  ;; Traditional Common Lisp folk will want this option set.
46  ;; I (WHN) made it optional because I came to Common Lisp from
47  ;; C++ through Scheme, so I'm accustomed to asking
48  ;; Emacs about things that I'm curious about instead of asking
49  ;; the executable I'm running.
50  :sb-doc
51
52  ;; When this is set, EVAL is implemented as an "IR1 interpreter": 
53  ;; code is compiled into the compiler's first internal representation,
54  ;; then the IR1 is interpreted. When this is not set, EVAL is implemented
55  ;; as a little bit of hackery wrapped around a call to COMPILE, i.e.
56  ;; the system becomes a "compiler-only implementation" of Common Lisp.
57  ;; As of sbcl-0.6.7, the compiler-only implementation is prototype code,
58  ;; and much less mature than the old IR1 interpreter. Thus, the safe
59  ;; thing is to leave :SB-INTERPRETER set. However, the compiler-only
60  ;; system is noticeably smaller, so you might want to omit
61  ;; :SB-INTERPRETER if you have a small machine.
62  ;;
63  ;; Probably, the compiler-only implementation will become more
64  ;; stable someday, and support for the IR1 interpreter will then be
65  ;; dropped. This will make the system smaller and easier to maintain
66  ;; not only because we no longer need to support the interpreter,
67  ;; but because code elsewhere in the system (the dumper, the debugger,
68  ;; etc.) no longer needs special cases for interpreted code.
69  :sb-interpreter
70
71  ;; Do regression and other tests when building the system. You
72  ;; might or might not want this if you're not a developer,
73  ;; depending on how paranoid you are. You probably do want it if
74  ;; you are a developer.
75  :sb-test
76
77  ;; Setting this makes more debugging information available.
78  ;; If you aren't hacking or troubleshooting SBCL itself, you
79  ;; probably don't want this set.
80  ;;
81  ;; At least two varieties of debugging information are enabled by this
82  ;; option:
83  ;;   * SBCL is compiled with a higher level of OPTIMIZE DEBUG, so that
84  ;;     the debugger can tell more about the state of the system.
85  ;;   * Various code to print debugging messages, and similar debugging code,
86  ;;     is compiled only when this feature is present.
87  ;;
88  ;; Note that the extra information recorded by the compiler at
89  ;; this higher level of OPTIMIZE DEBUG includes the source location
90  ;; forms. In order for the debugger to use this information, it has to
91  ;; re-READ the source file. In an ordinary installation of SBCL, this
92  ;; re-READing may not work very well, for either of two reasons:
93  ;;   * The sources aren't present on the system in the same location that
94  ;;     they were on the system where SBCL was compiled.
95  ;;   * SBCL is using the standard readtable, without the added hackage
96  ;;     which allows it to handle things like target features.
97  ;; If you want to be able to use the extra debugging information,
98  ;; therefore, be sure to keep the sources around, and run with the
99  ;; readtable configured so that the system sources can be read.
100  ; :sb-show
101
102  ;; Enable extra debugging output in the assem.lisp assembler/scheduler
103  ;; code. (This is the feature which was called :DEBUG in the
104  ;; original CMU CL code.)
105  ; :sb-show-assem
106
107  ;; Setting this makes SBCL more "fluid", i.e. more amenable to
108  ;; modification at runtime, by suppressing various INLINE declarations,
109  ;; compiler macro definitions, FREEZE-TYPE declarations; and by
110  ;; suppressing various burning-our-ships-behind-us actions after
111  ;; initialization is complete; and so forth. This tends to clobber the
112  ;; performance of the system, so unless you have some special need for
113  ;; this when hacking SBCL itself, you don't want this set.
114  ; :sb-fluid
115
116  ;; Enable code for collecting statistics on usage of various operations,
117  ;; useful for performance tuning of the SBCL system itself. This code
118  ;; is probably pretty stale (having not been tested since the fork from
119  ;; base CMU CL) but might nonetheless be a useful starting point for
120  ;; anyone who wants to collect such statistics in the future.
121  ; :sb-dyncount
122
123  ;; Peter Van Eynde's increase-bulletproofness code
124  ;;
125  ;; This is not maintained or tested in current SBCL, but I haven't
126  ;; gone out of my way to remove or break it, either.
127  ;;
128  ; :high-security
129  ; :high-security-support
130
131  ;; multiprocessing support
132  ;;
133  ;; This is not maintained or tested in current SBCL. I haven't gone out
134  ;; of my way to break it, but since it's derived from an old version of 
135  ;; CMU CL where multiprocessing was pretty shaky, it's likely to be very
136  ;; flaky now.
137  ;;   :MP enables multiprocessing
138  ;;   :MP-I486 is used, only within the multiprocessing code, to control
139  ;;            what seems to control processor-version-specific code. It's
140  ;;            probably for 486 or later, i.e. could be set as long as
141  ;;            you know you're not running on a 386, but it doesn't seem
142  ;;            to be documented anywhere, so that's just a guess.
143  ; :mp
144  ; :mp-i486
145
146  ;; KLUDGE: used to suppress stale code related to floating point infinities.
147  ;; I intend to delete this code completely some day, since it was a pain
148  ;; for me to try to work with and since all benefits it provides are
149  ;; non-portable. Until I actually pull the trigger, though, I've left
150  ;; various stale code in place protected with #!-SB-INFINITIES.
151  ; :sb-infinities
152
153  ;; This affects the definition of a lot of things in bignum.lisp. It
154  ;; doesn't seem to be documented anywhere what systems it might apply to.
155  ;; It doesn't seem to be needed for X86 systems anyway.
156  ; :32x16-divide
157
158  ;; This is probably true for some processor types, but not X86. It affects
159  ;; a lot of floating point code.
160  ; :negative-zero-is-not-zero
161
162  ;; This is mentioned in cmu-user.tex, which says that it enables
163  ;; the compiler to reason about integer arithmetic. It also seems to
164  ;; control other fancy numeric reasoning, e.g. knowing the result type of
165  ;; a remainder calculation given the type of its inputs.
166  ;;
167  ;; KLUDGE: Even when this is implemented for the target feature list,
168  ;; the code to implement this feature will not generated in the
169  ;; cross-compiler (i.e. will only be generated in the target compiler).
170  ;; The reason for this is that the interval arithmetic routines used
171  ;; to implement this feature are written under the assumption that
172  ;; Lisp arithmetic supports plus and minus infinity, which isn't guaranteed by
173  ;; ANSI Common Lisp. I've tried to mark the conditionals which implement
174  ;; this kludge with the string CROSS-FLOAT-INFINITY-KLUDGE so that
175  ;; sometime it might be possible to undo them (perhaps by using
176  ;; nice portable :PLUS-INFINITY and :MINUS-INFINITY values instead of
177  ;; implementation dependent floating infinity values, which would
178  ;; admittedly involve extra consing; or perhaps by finding some cleaner
179  ;; way of suppressing the construction of this code in the cross-compiler).
180  ;;
181  ;; KLUDGE: Even after doing the KLUDGE above, the cross-compiler doesn't work,
182  ;; because some interval operations are conditional on PROPAGATE-FUN-TYPE
183  ;; instead of PROPAGATE-FLOAT-TYPE. So for now, I've completely turned off
184  ;; both PROPAGATE-FUN-TYPE and PROPAGATE-FLOAT-TYPE. (After I build
185  ;; a compiler which works, then I can think about getting the optimization
186  ;; to work.) -- WHN 19990702
187  ; :propagate-float-type
188
189  ;; According to cmu-user.tex, this enables the compiler to infer result
190  ;; types for mathematical functions a la SQRT, EXPT, and LOG, allowing
191  ;; it to e.g. eliminate the possibility that a complex result will be
192  ;; generated.
193  ;;
194  ;; KLUDGE: turned off as per the comments for PROPAGATE-FLOAT-TYPE above
195  ; :propagate-fun-type
196
197  ;; It's unclear to me what this does (but it was enabled in the code that I
198  ;; picked up from Peter Van Eynde). -- WHN 19990224
199  :constrain-float-type
200
201  ;; This is set in classic CMU CL, and presumably there it means
202  ;; that the floating point arithmetic implementation
203  ;; conforms to IEEE's standard. Here it definitely means that the
204  ;; floating point arithmetic implementation conforms to IEEE's standard.
205  ;; I (WHN 19990702) haven't tried to verify
206  ;; that it does conform, but it should at least mostly conform (because
207  ;; the underlying x86 hardware tries).
208  :ieee-floating-point
209
210  ;; This seems to be the pre-GENCGC garbage collector for CMU CL, which was
211  ;; AFAIK never supported for the X86.
212  ; :gengc
213
214  ;; CMU CL had, and we inherited, code to support 80-bit LONG-FLOAT on the x86
215  ;; architecture. Nothing has been done to actively destroy the long float
216  ;; support, but it hasn't been thoroughly maintained, and needs at least
217  ;; some maintenance before it will work. (E.g. the LONG-FLOAT-only parts of
218  ;; genesis are still implemented in terms of unportable CMU CL functions
219  ;; which are not longer available at genesis time in SBCL.) A deeper
220  ;; problem is SBCL's bootstrap process implicitly assumes that the
221  ;; cross-compilation host will be able to make the same distinctions
222  ;; between floating point types that it does. This assumption is
223  ;; fundamentally sleazy, even though in practice it's unlikely to break down
224  ;; w.r.t. distinguishing SINGLE-FLOAT from DOUBLE-FLOAT; it's much more
225  ;; likely to break down w.r.t. distinguishing DOUBLE-FLOAT from LONG-FLOAT.
226  ;; Still it's likely to be quite doable to get LONG-FLOAT support working
227  ;; again, if anyone's sufficiently motivated.
228  ; :long-float
229
230  ;;
231  ;; miscellaneous notes on other things which could have special significance
232  ;; in the *FEATURES* list
233  ;;
234
235  ;; notes on the :NIL and :IGNORE features:
236  ;;
237  ;; #+NIL is used to comment out forms. Occasionally #+IGNORE is used
238  ;; for this too. So don't use :NIL or :IGNORE as the names of features..
239
240  ;; notes on :SB-XC and :SB-XC-HOST features (which aren't controlled by this
241  ;; file, but are instead temporarily pushed onto *FEATURES* or
242  ;; *TARGET-FEATURES* during some phases of cross-compilation):
243  ;;
244  ;; :SB-XC-HOST stands for "cross-compilation host" and is in *FEATURES*
245  ;; during the first phase of cross-compilation bootstrapping, when the
246  ;; host Lisp is being used to compile the cross-compiler.
247  ;;
248  ;; :SB-XC stands for "cross compiler", and is in *FEATURES* during the second
249  ;; phase of cross-compilation bootstrapping, when the cross-compiler is
250  ;; being used to create the first target Lisp.
251
252  ;; notes on the :SB-ASSEMBLING feature (which isn't controlled by
253  ;; this file):
254  ;;
255  ;; This is a flag for whether we're in the assembler. It's
256  ;; temporarily pushed onto the *FEATURES* list in the setup for
257  ;; the ASSEMBLE-FILE function. It would be a bad idea
258  ;; to use it as a name for a permanent feature.
259
260  ;; notes on local features (which are set automatically by the
261  ;; configuration script, and should not be set here unless you
262  ;; really, really know what you're doing):
263  ;; 
264  ;; machine architecture features:
265  ;;   :x86 ; any Intel 386 or better, or compatibles like the AMD K6 or K7
266  ;;   (No others are supported by SBCL as of 0.6.7, but :alpha or 
267  ;;   :sparc support could be ported from CMU CL if anyone is
268  ;;   sufficiently motivated to do so.)
269  ;;   (CMU CL also had a :pentium feature, which affected the definition 
270  ;;   of some floating point vops. It was present but not enabled in the
271  ;;   CMU CL code that SBCL is derived from, and is present but stale
272  ;;   in SBCL as of 0.6.7.)
273  ;;
274  ;; operating system features:
275  ;;   :linux   = We're intended to run under some version of Linux.
276  ;;   :bsd     = We're intended to run under some version of BSD Unix. (This
277  ;;              is not exclusive with the features which indicate which
278  ;;              particular version of BSD we're intended to run under.)
279  ;;   :freebsd = We're intended to run under FreeBSD.
280  ;;   :openbsd = We're intended to run under FreeBSD.
281  ;; (No others are supported by SBCL as of 0.6.7, but :hpux or
282  ;; :solaris support could be ported from CMU CL if anyone is
283  ;; sufficiently motivated to do so.)
284  )