0.pre7.25:
[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 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
9 ;;;; this:
10 ;;;;    (lambda (list)
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)
16 ;;;;        list))
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.
20
21 ;;;; This software is part of the SBCL system. See the README file for
22 ;;;; more information.
23 ;;;;
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.
29
30 (
31  ;;
32  ;; features present in all builds
33  ;;
34
35  ;; our standard
36  :ansi-cl :common-lisp
37  ;; FIXME: Isn't there a :x3jsomething feature which we should set too?
38
39  ;; our dialect
40  :sbcl
41
42  ;; Douglas Thomas Crosher's conservative generational GC (the only one
43  ;; we currently support for X86)
44  :gencgc
45
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.
52  :unix
53
54  ;;
55  ;; features present in this particular build
56  ;;
57
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.
65  :sb-doc
66
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.
71  :sb-test
72
73  ;; Make more debugging information available (for debugging SBCL
74  ;; itself). If you aren't hacking or troubleshooting SBCL itself,
75  ;; you probably don't want this set.
76  ;;
77  ;; At least two varieties of debugging information are enabled by this
78  ;; option:
79  ;;   * SBCL is compiled with a higher level of OPTIMIZE DEBUG, so that
80  ;;     the debugger can tell more about the state of the system.
81  ;;   * Various code to print debugging messages, and similar debugging code,
82  ;;     is compiled only when this feature is present.
83  ;;
84  ;; Note that the extra information recorded by the compiler at
85  ;; this higher level of OPTIMIZE DEBUG includes the source location
86  ;; forms. In order for the debugger to use this information, it has to
87  ;; re-READ the source file. In an ordinary installation of SBCL, this
88  ;; re-READing may not work very well, for either of two reasons:
89  ;;   * The sources aren't present on the system in the same location that
90  ;;     they were on the system where SBCL was compiled.
91  ;;   * SBCL is using the standard readtable, without the added hackage
92  ;;     which allows it to handle things like target features.
93  ;; If you want to be able to use the extra debugging information,
94  ;; therefore, be sure to keep the sources around, and run with the
95  ;; readtable configured so that the system sources can be read.
96  ; :sb-show
97
98  ;; Build SBCL with the old CMU CL low level debugger, "ldb". If 
99  ;; are aren't messing with CMU CL at a very low level (e.g. 
100  ;; trying to diagnose GC problems) you shouldn't need this.
101  ; :sb-ldb
102
103  ;; This isn't really a target Lisp feature at all, but controls
104  ;; whether the build process produces an after-xc.core file. This
105  ;; can be useful for shortening the edit/compile/debug cycle if
106  ;; you're messing around with low-level internals of the system,
107  ;; as in slam.sh. Otherwise you don't need it.
108  ; :sb-after-xc-core
109
110  ;; Enable extra debugging output in the assem.lisp assembler/scheduler
111  ;; code. (This is the feature which was called :DEBUG in the
112  ;; original CMU CL code.)
113  ; :sb-show-assem
114
115  ;; Setting this makes SBCL more "fluid", i.e. more amenable to
116  ;; modification at runtime, by suppressing various INLINE declarations,
117  ;; compiler macro definitions, FREEZE-TYPE declarations; and by
118  ;; suppressing various burning-our-ships-behind-us actions after
119  ;; initialization is complete; and so forth. This tends to clobber the
120  ;; performance of the system, so unless you have some special need for
121  ;; this when hacking SBCL itself, you don't want this set.
122  ; :sb-fluid
123
124  ;; Enable code for collecting statistics on usage of various operations,
125  ;; useful for performance tuning of the SBCL system itself. This code
126  ;; is probably pretty stale (having not been tested since the fork from
127  ;; base CMU CL) but might nonetheless be a useful starting point for
128  ;; anyone who wants to collect such statistics in the future.
129  ; :sb-dyncount
130
131  ;; Peter Van Eynde's increase-bulletproofness code
132  ;;
133  ;; This is not maintained or tested in current SBCL, but I haven't
134  ;; gone out of my way to remove or break it, either.
135  ;;
136  ; :high-security
137  ; :high-security-support
138
139  ;; multiprocessing support
140  ;;
141  ;; This is not maintained or tested in current SBCL. I haven't gone out
142  ;; of my way to break it, but since it's derived from an old version of 
143  ;; CMU CL where multiprocessing was pretty shaky, it's likely to be very
144  ;; flaky now.
145  ;;   :MP enables multiprocessing
146  ;;   :MP-I486 is used, only within the multiprocessing code, to control
147  ;;            what seems to control processor-version-specific code. It's
148  ;;            probably for 486 or later, i.e. could be set as long as
149  ;;            you know you're not running on a 386, but it doesn't seem
150  ;;            to be documented anywhere, so that's just a guess.
151  ; :mp
152  ; :mp-i486
153
154  ;; This affects the definition of a lot of things in bignum.lisp. It
155  ;; doesn't seem to be documented anywhere what systems it might apply
156  ;; to. It doesn't seem to be needed for X86 systems anyway.
157  ; :32x16-divide
158
159  ;; This is probably true for some processor types, but not X86. It
160  ;; affects a lot of floating point code.
161  ; :negative-zero-is-not-zero
162
163  ;; This is set in classic CMU CL, and presumably there it means
164  ;; that the floating point arithmetic implementation
165  ;; conforms to IEEE's standard. Here it definitely means that the
166  ;; floating point arithmetic implementation conforms to IEEE's standard.
167  ;; I (WHN 19990702) haven't tried to verify
168  ;; that it does conform, but it should at least mostly conform (because
169  ;; the underlying x86 hardware tries).
170  :ieee-floating-point
171
172  ;; This seems to be the pre-GENCGC garbage collector for CMU CL, which was
173  ;; AFAIK never supported for the X86.
174  ; :gengc
175
176  ;; CMU CL had, and we inherited, code to support 80-bit LONG-FLOAT on the x86
177  ;; architecture. Nothing has been done to actively destroy the long float
178  ;; support, but it hasn't been thoroughly maintained, and needs at least
179  ;; some maintenance before it will work. (E.g. the LONG-FLOAT-only parts of
180  ;; genesis are still implemented in terms of unportable CMU CL functions
181  ;; which are not longer available at genesis time in SBCL.) A deeper
182  ;; problem is SBCL's bootstrap process implicitly assumes that the
183  ;; cross-compilation host will be able to make the same distinctions
184  ;; between floating point types that it does. This assumption is
185  ;; fundamentally sleazy, even though in practice it's unlikely to break down
186  ;; w.r.t. distinguishing SINGLE-FLOAT from DOUBLE-FLOAT; it's much more
187  ;; likely to break down w.r.t. distinguishing DOUBLE-FLOAT from LONG-FLOAT.
188  ;; Still it's likely to be quite doable to get LONG-FLOAT support working
189  ;; again, if anyone's sufficiently motivated.
190  ; :long-float
191
192  ;;
193  ;; miscellaneous notes on other things which could have special significance
194  ;; in the *FEATURES* list
195  ;;
196
197  ;; notes on the :NIL and :IGNORE features:
198  ;;
199  ;; #+NIL is used to comment out forms. Occasionally #+IGNORE is used
200  ;; for this too. So don't use :NIL or :IGNORE as the names of features..
201
202  ;; notes on :SB-XC and :SB-XC-HOST features (which aren't controlled by this
203  ;; file, but are instead temporarily pushed onto *FEATURES* or
204  ;; *TARGET-FEATURES* during some phases of cross-compilation):
205  ;;
206  ;; :SB-XC-HOST stands for "cross-compilation host" and is in *FEATURES*
207  ;; during the first phase of cross-compilation bootstrapping, when the
208  ;; host Lisp is being used to compile the cross-compiler.
209  ;;
210  ;; :SB-XC stands for "cross compiler", and is in *FEATURES* during the second
211  ;; phase of cross-compilation bootstrapping, when the cross-compiler is
212  ;; being used to create the first target Lisp.
213
214  ;; notes on the :SB-ASSEMBLING feature (which isn't controlled by
215  ;; this file):
216  ;;
217  ;; This is a flag for whether we're in the assembler. It's
218  ;; temporarily pushed onto the *FEATURES* list in the setup for
219  ;; the ASSEMBLE-FILE function. It would be a bad idea
220  ;; to use it as a name for a permanent feature.
221
222  ;; notes on local features (which are set automatically by the
223  ;; configuration script, and should not be set here unless you
224  ;; really, really know what you're doing):
225  ;; 
226  ;; machine architecture features:
227  ;;   :x86
228  ;;      any Intel 386 or better, or compatibles like the AMD K6 or K7
229  ;;   :alpha
230  ;;      DEC/Compaq Alpha CPU
231  ;; (No other CPUs are supported by SBCL as of 0.6.12.15, but SPARC or
232  ;; PowerPC support could be ported from CMU CL if anyone is
233  ;; sufficiently motivated to do so, or if you're *really* motivated,
234  ;; you could write a port from scratch for a new CPU architecture.)
235  ;; (CMU CL also had a :pentium feature, which affected the definition
236  ;; of some floating point vops. It was present but not enabled or 
237  ;; documented in the CMU CL code that SBCL is derived from, and is
238  ;; present but stale in SBCL as of 0.6.12.)
239  ;;
240  ;; operating system features:
241  ;;   :linux   = We're intended to run under some version of Linux.
242  ;;   :bsd     = We're intended to run under some version of BSD Unix. (This
243  ;;              is not exclusive with the features which indicate which
244  ;;              particular version of BSD we're intended to run under.)
245  ;;   :freebsd = We're intended to run under FreeBSD.
246  ;;   :openbsd = We're intended to run under FreeBSD.
247  ;; (No others are supported by SBCL as of 0.6.7, but :hpux or
248  ;; :solaris support could be ported from CMU CL if anyone is
249  ;; sufficiently motivated to do so, and it'd even be possible,
250  ;; though harder, to port the system to Microsoft Windows.)
251  )