0.9.13.36: global policy / null-lexenv confusion fix
[sbcl.git] / base-target-features.lisp-expr
1 ;;;; -*- Lisp -*-
2
3 ;;;; tags which are set during the build process and which end up in
4 ;;;; CL:*FEATURES* in the target SBCL, plus some comments about other
5 ;;;; CL:*FEATURES* tags which have special meaning to SBCL or which
6 ;;;; have a special conventional meaning
7 ;;;;
8 ;;;; Note that the recommended way to customize the features of a
9 ;;;; local build of SBCL is not to edit this file, but instead to
10 ;;;; tweak customize-target-features.lisp. If you define a function
11 ;;;; in customize-target-features.lisp, it will be used to transform
12 ;;;; the target features list after it's read and before it's used.
13 ;;;; E.g. you can use code like this:
14 ;;;;    (lambda (list)
15 ;;;;      (flet ((enable (x) (pushnew x list))
16 ;;;;             (disable (x) (setf list (remove x list))))
17 ;;;;        #+nil (enable :sb-show)
18 ;;;;        (enable :sb-after-xc-core)
19 ;;;;        #+nil (disable :sb-doc)
20 ;;;;        list))
21 ;;;; By thus editing a local file (one which is not in the source
22 ;;;; distribution, and which is in .cvsignore) your customizations
23 ;;;; will remain local even if you do things like "cvs update",
24 ;;;; will not show up if you try to submit a patch with "cvs diff",
25 ;;;; and might even stay out of the way if you use other non-CVS-based
26 ;;;; methods to upgrade the files or store your configuration.
27
28 ;;;; This software is part of the SBCL system. See the README file for
29 ;;;; more information.
30 ;;;;
31 ;;;; This software is derived from the CMU CL system, which was
32 ;;;; written at Carnegie Mellon University and released into the
33 ;;;; public domain. The software is in the public domain and is
34 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
35 ;;;; files for more information.
36
37 (
38  ;;
39  ;; features present in all builds
40  ;;
41
42  ;; our standard
43  :ansi-cl :common-lisp
44  ;; FIXME: Isn't there a :x3jsomething feature which we should set too?
45  ;; No. CLHS says ":x3j13 [...] A conforming implementation might or
46  ;; might not contain such a feature." -- CSR, 2002-02-21
47
48  ;; our dialect
49  :sbcl
50
51  ;; Douglas Thomas Crosher's conservative generational GC (the only one
52  ;; we currently support for X86).
53  ;; :gencgc used to be here; CSR moved it into
54  ;; local-target-features.lisp-expr via make-config.sh, as alpha,
55  ;; sparc and ppc ports don't currently support it. -- CSR, 2002-02-21
56
57  ;; We're running under a UNIX. This is sort of redundant, and it was also
58  ;; sort of redundant under CMU CL, which we inherited it from: neither SBCL
59  ;; nor CMU CL supports anything but UNIX (and "technically not UNIX"es
60  ;; such as *BSD and Linux). But someday, maybe we might, and in that case
61  ;; we'd presumably remove this, so its presence conveys the information
62  ;; that the system isn't one which follows such a change.
63  :unix
64
65  ;;
66  ;; features present in this particular build
67  ;;
68
69  ;; Setting this enables the compilation of documentation strings
70  ;; from the system sources into the target Lisp executable.
71  ;; Traditional Common Lisp folk will want this option set.
72  ;; I (WHN) made it optional because I came to Common Lisp from
73  ;; C++ through Scheme, so I'm accustomed to asking
74  ;; Emacs about things that I'm curious about instead of asking
75  ;; the executable I'm running.
76  :sb-doc
77
78  ;; Do regression and other tests when building the system. You might
79  ;; or might not want this if you're not a developer, depending on how
80  ;; paranoid you are. You probably do want it if you are a developer.
81  ;; This test does not affect the target system (in much the same way
82  ;; as :sb-after-xc-core, below).
83  :sb-test
84
85  ;; Make more debugging information available (for debugging SBCL
86  ;; itself). If you aren't hacking or troubleshooting SBCL itself,
87  ;; you probably don't want this set.
88  ;;
89  ;; At least two varieties of debugging information are enabled by this
90  ;; option:
91  ;;   * SBCL is compiled with a higher level of OPTIMIZE DEBUG, so that
92  ;;     the debugger can tell more about the state of the system.
93  ;;   * Various code to print debugging messages, and similar debugging code,
94  ;;     is compiled only when this feature is present.
95  ;;
96  ;; Note that the extra information recorded by the compiler at
97  ;; this higher level of OPTIMIZE DEBUG includes the source location
98  ;; forms. In order for the debugger to use this information, it has to
99  ;; re-READ the source file. In an ordinary installation of SBCL, this
100  ;; re-READing may not work very well, for either of two reasons:
101  ;;   * The sources aren't present on the system in the same location that
102  ;;     they were on the system where SBCL was compiled.
103  ;;   * SBCL is using the standard readtable, without the added hackage
104  ;;     which allows it to handle things like target features.
105  ;; If you want to be able to use the extra debugging information,
106  ;; therefore, be sure to keep the sources around, and run with the
107  ;; readtable configured so that the system sources can be read.
108  ; :sb-show
109
110  ;; Build SBCL with the old CMU CL low level debugger, "ldb". In the
111  ;; ideal world you would not need this unless you are messing with
112  ;; SBCL at a very low level (e.g., trying to diagnose GC problems, or
113  ;; trying to debug assembly code for a port to a new CPU). However,
114  ;; experience shows that sooner or later everyone lose()'s, in which
115  ;; case SB-LDB can at least provide an informative backtrace.
116  :sb-ldb
117
118  ;; This isn't really a target Lisp feature at all, but controls
119  ;; whether the build process produces an after-xc.core file. This
120  ;; can be useful for shortening the edit/compile/debug cycle when
121  ;; you modify SBCL's own source code, as in slam.sh. Otherwise
122  ;; you don't need it.
123  ; :sb-after-xc-core
124
125  ;; Enable extra debugging output in the assem.lisp assembler/scheduler
126  ;; code. (This is the feature which was called :DEBUG in the
127  ;; original CMU CL code.)
128  ; :sb-show-assem
129
130  ;; Setting this makes SBCL more "fluid", i.e. more amenable to
131  ;; modification at runtime, by suppressing various INLINE declarations,
132  ;; compiler macro definitions, FREEZE-TYPE declarations; and by
133  ;; suppressing various burning-our-ships-behind-us actions after
134  ;; initialization is complete; and so forth. This tends to clobber the
135  ;; performance of the system, so unless you have some special need for
136  ;; this when hacking SBCL itself, you don't want this set.
137  ; :sb-fluid
138
139  ;; Enable code for collecting statistics on usage of various operations,
140  ;; useful for performance tuning of the SBCL system itself. This code
141  ;; is probably pretty stale (having not been tested since the fork from
142  ;; base CMU CL) but might nonetheless be a useful starting point for
143  ;; anyone who wants to collect such statistics in the future.
144  ; :sb-dyncount
145
146  ;; Peter Van Eynde's increase-bulletproofness code for CMU CL
147  ;;
148  ;; Some of the code which was #+high-security before the fork has now
149  ;; been either made unconditional, deleted, or rewritten into
150  ;; unrecognizability, but some remains. What remains is not maintained
151  ;; or tested in current SBCL, but I haven't gone out of my way to
152  ;; break it, either.
153  ;;
154  ; :high-security
155  ; :high-security-support
156
157  ;; low-level thread primitives support
158  ;;
159  ;; As of SBCL 0.8, this is only supposed to work in x86 Linux with
160  ;; NPTL support (usually kernel 2.6, though sme Red Hat distributions
161  ;; with older kernels also have it) and is implemented using clone(2)
162  ;; and the %fs segment register.  Note that no consistent effort to
163  ;; audit the SBCL library code for thread safety has been performed,
164  ;; so caveat executor.
165  ; :sb-thread
166
167  ;; lutex support
168  ;;
169  ;; While on linux we are able to use futexes for our locking
170  ;; primitive, on other platforms we don't have this luxury. NJF's
171  ;; lutexes present a locking API similar to the futex-based API that
172  ;; allows for sb-thread support on x86 OS X, Solaris and
173  ;; FreeBSD.
174  ;;
175  ; :sb-lutex
176
177  ;; On some operating systems the FS segment register (used for SBCL's
178  ;; thread local storage) is not reliably preserved in signal
179  ;; handlers, so we need to restore its value from the pthread thread
180  ;; local storage.
181  ; :restore-tls-segment-register-from-tls
182
183  ;; Support for detection of unportable code (when applied to the
184  ;; COMMON-LISP package, or SBCL-internal pacakges) or bad-neighbourly
185  ;; code (when applied to user-level packages), relating to material
186  ;; alteration to packages or to bindings in symbols in packages.
187  :sb-package-locks
188
189  ;; Support for the entirety of the 21-bit character space defined by
190  ;; the Unicode consortium, rather than the classical 8-bit ISO-8859-1
191  ;; character set.
192  :sb-unicode
193
194  ;; Record source location information for variables, classes, conditions,
195  ;; packages, etc. Gives much better information on M-. in Slime, but
196  ;; increases core size by about 100kB.
197  :sb-source-locations
198
199  ;; This affects the definition of a lot of things in bignum.lisp. It
200  ;; doesn't seem to be documented anywhere what systems it might apply
201  ;; to. It doesn't seem to be needed for X86 systems anyway.
202  ; :32x16-divide
203
204  ;; This is set in classic CMU CL, and presumably there it means
205  ;; that the floating point arithmetic implementation
206  ;; conforms to IEEE's standard. Here it definitely means that the
207  ;; floating point arithmetic implementation conforms to IEEE's standard.
208  ;; I (WHN 19990702) haven't tried to verify
209  ;; that it does conform, but it should at least mostly conform (because
210  ;; the underlying x86 hardware tries).
211  :ieee-floating-point
212
213  ;; CMU CL had, and we inherited, code to support 80-bit LONG-FLOAT on the x86
214  ;; architecture. Nothing has been done to actively destroy the long float
215  ;; support, but it hasn't been thoroughly maintained, and needs at least
216  ;; some maintenance before it will work. (E.g. the LONG-FLOAT-only parts of
217  ;; genesis are still implemented in terms of unportable CMU CL functions
218  ;; which are not longer available at genesis time in SBCL.) A deeper
219  ;; problem is SBCL's bootstrap process implicitly assumes that the
220  ;; cross-compilation host will be able to make the same distinctions
221  ;; between floating point types that it does. This assumption is
222  ;; fundamentally sleazy, even though in practice it's unlikely to break down
223  ;; w.r.t. distinguishing SINGLE-FLOAT from DOUBLE-FLOAT; it's much more
224  ;; likely to break down w.r.t. distinguishing DOUBLE-FLOAT from LONG-FLOAT.
225  ;; Still it's likely to be quite doable to get LONG-FLOAT support working
226  ;; again, if anyone's sufficiently motivated.
227  ; :long-float
228
229  ;;
230  ;; miscellaneous notes on other things which could have special significance
231  ;; in the *FEATURES* list
232  ;;
233
234  ;; Any target feature which affects binary compatibility of fasl files
235  ;; needs to be recorded in *FEATURES-POTENTIALLY-AFFECTING-FASL-FORMAT*
236  ;; (elsewhere).
237
238  ;; notes on the :NIL and :IGNORE features:
239  ;;
240  ;; #+NIL is used to comment out forms. Occasionally #+IGNORE is used
241  ;; for this too. So don't use :NIL or :IGNORE as the names of features..
242
243  ;; notes on :SB-XC and :SB-XC-HOST features (which aren't controlled by this
244  ;; file, but are instead temporarily pushed onto *FEATURES* or
245  ;; *TARGET-FEATURES* during some phases of cross-compilation):
246  ;;
247  ;; :SB-XC-HOST stands for "cross-compilation host" and is in *FEATURES*
248  ;; during the first phase of cross-compilation bootstrapping, when the
249  ;; host Lisp is being used to compile the cross-compiler.
250  ;;
251  ;; :SB-XC stands for "cross compiler", and is in *FEATURES* during the second
252  ;; phase of cross-compilation bootstrapping, when the cross-compiler is
253  ;; being used to create the first target Lisp.
254
255  ;; notes on the :SB-ASSEMBLING feature (which isn't controlled by
256  ;; this file):
257  ;;
258  ;; This is a flag for whether we're in the assembler. It's
259  ;; temporarily pushed onto the *FEATURES* list in the setup for
260  ;; the ASSEMBLE-FILE function. It would be a bad idea
261  ;; to use it as a name for a permanent feature.
262
263  ;; notes on local features (which are set automatically by the
264  ;; configuration script, and should not be set here unless you
265  ;; really, really know what you're doing):
266  ;;
267  ;; machine architecture features:
268  ;;   :x86
269  ;;      any Intel 386 or better, or compatibles like the AMD K6 or K7
270  ;;   :x86-64
271  ;;      any x86-64 CPU running in 64-bit mode
272  ;;   :alpha
273  ;;      DEC/Compaq Alpha CPU
274  ;;   :sparc
275  ;;      any Sun UltraSPARC (possibly also non-Ultras -- currently untested)
276  ;;   :ppc
277  ;;      any PowerPC CPU
278  ;;   :hppa
279  ;;      any PA-RISC CPU
280  ;;   :mips
281  ;;      any MIPS CPU (in little-endian mode with :little-endian -- currently
282  ;;      untested)
283  ;;
284  ;; (CMU CL also had a :pentium feature, which affected the definition
285  ;; of some floating point vops. It was present but not enabled or
286  ;; documented in the CMU CL code that SBCL is derived from, and has
287  ;; now been moved to the backend-subfeatures mechanism.)
288  ;;
289  ;; properties derived from the machine architecture
290  ;;   :control-stack-grows-downward-not-upward
291  ;;     On the X86, the Lisp control stack grows downward. On the
292  ;;     other supported CPU architectures as of sbcl-0.7.1.40, the
293  ;;     system stack grows upward.
294  ;;   Note that there are other stack-related differences between the
295  ;;   X86 port and the other ports. E.g. on the X86, the Lisp control
296  ;;   stack coincides with the C stack, meaning that on the X86 there's
297  ;;   stuff on the control stack that the Lisp-level debugger doesn't
298  ;;   understand very well. As of sbcl-0.7.1.40 things like that are
299  ;;   just parameterized by #!+X86, but it'd probably be better to
300  ;;   use new flags like :CONTROL-STACK-CONTAINS-C-STACK.
301  ;;
302  ;;   :stack-allocatable-closures
303  ;;     The compiler can allocate dynamic-extent closures on stack.
304  ;;
305  ;;   :alien-callbacks
306  ;;     Alien callbacks have been implemented for this platform.
307  ;;
308  ;; operating system features:
309  ;;   :linux   = We're intended to run under some version of Linux.
310  ;;   :bsd     = We're intended to run under some version of BSD Unix. (This
311  ;;              is not exclusive with the features which indicate which
312  ;;              particular version of BSD we're intended to run under.)
313  ;;   :freebsd = We're intended to run under FreeBSD.
314  ;;   :openbsd = We're intended to run under OpenBSD.
315  ;;   :netbsd  = We're intended to run under NetBSD.
316  ;;   :darwin  = We're intended to run under Darwin (including MacOS X).
317  ;;   :sunos   = We're intended to run under Solaris user environment
318  ;;              with the SunOS kernel.
319  ;;   :osf1    = We're intended to run under Tru64 (aka Digital Unix
320  ;;              aka OSF/1).
321  ;; (No others are supported by SBCL as of 0.9.6, but :hpux or :irix
322  ;; support could be ported from CMU CL if anyone is sufficiently
323  ;; motivated to do so, and it'd even be possible, though harder, to
324  ;; port the system to Microsoft Windows.)
325  )