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