;;;; provided with absolutely no warranty. See the COPYING and CREDITS
;;;; files for more information.
-;;; TO DO: Might it be possible to increase the efficiency of CMU CL's garbage
-;;; collection on my large (256Mb) machine by doing larger incremental GC steps
-;;; than the default 2 Mb of CMU CL 2.4.9? A quick test 19990729, setting this
-;;; to 5E6 showed no significant improvement, but it's possible that more
-;;; cleverness might help..
-;#+cmu (setf ext:*bytes-consed-between-gcs* (* 5 (expt 10 6)))
+;;; GC tuning has little effect on the x86 due to the generational
+;;; collector. For the older stop & copy collector, it assuredly
+;;; does. GC time is proportional to the amount of non-garbage
+;;; needing collection and copying; when the application involved is
+;;; the SBCL compiler, it doesn't take any longer to collect 20 Mb than
+;;; to collect 2 Mb. -dan, 20000819
+;;;
+;;; Actually, tweaking *BYTES-CONSED-BETWEEN-GCS* to 20Mb instead of
+;;; the default 2 seemed to make SBCL rebuild O(25%) faster on my 256
+;;; Mb K6/3, so I think it does have some effect on X86/GENCGC. I
+;;; haven't looked into why this would be, though. Also, I'm afraid
+;;; that using 20Mb here might be unfriendly to people using more-reasonable
+;;; machines (like old laptops with 48Mb of memory..) so I've
+;;; suppressed this tweak except for Alpha. -- WHN 2001-05-11
+#+(and sbcl alpha) ; SBCL/Alpha uses stop-and-copy, and Alphas have lotso RAM.
+(progn
+ (sb-ext:gc-off)
+ (setf (bytes-consed-between-gcs) (* 20 (expt 10 6)))
+ (sb-ext:gc-on)
+ (sb-ext:gc))
;;; FIXME: I'm now inclined to make all the bootstrap stuff run in CL-USER
;;; instead of SB-COLD. If I do so, I should first take care to
(defpackage "SB-COLD" (:use "CL"))
(in-package "SB-COLD")
-;;; prefix for source filename stems when cross-compiling
-(defvar *src-prefix* "src/")
-;;; (We don't bother to specify the source suffix here because ".lisp" is such
-;;; a good default value that we never have to specify it explicitly.)
-
;;; prefixes for filename stems when cross-compiling. These are quite arbitrary
;;; (although of course they shouldn't collide with anything we don't want to
;;; write over). In particular, they can be either relative path names (e.g.
(defparameter *stems-and-flags* (read-from-file "stems-and-flags.lisp-expr"))
-(defmacro for-stems-and-flags ((stem flags) &body body)
+(defmacro do-stems-and-flags ((stem flags) &body body)
(let ((stem-and-flags (gensym "STEM-AND-FLAGS-")))
`(dolist (,stem-and-flags *stems-and-flags*)
(let ((,stem (first ,stem-and-flags))
;;; Check for stupid typos in FLAGS list keywords.
(let ((stems (make-hash-table :test 'equal)))
- (for-stems-and-flags (stem flags)
+ (do-stems-and-flags (stem flags)
(if (gethash stem stems)
(error "duplicate stem ~S in stems-and-flags data" stem)
(setf (gethash stem stems) t))
(error "found unexpected flag(s) in *STEMS-AND-FLAGS*: ~S"
set-difference)))))
\f
-;;;; compiling SBCL sources to create the cross-compiler
+;;;; tools to compile SBCL sources to create the cross-compiler
;;; Execute function FN in an environment appropriate for compiling the
;;; cross-compiler's source code in the cross-compilation host.
(defun in-host-compilation-mode (fn)
- (let ((*features* (cons :sb-xc-host *features*)))
+ (let ((*features* (cons :sb-xc-host *features*))
+ ;; the CROSS-FLOAT-INFINITY-KLUDGE, as documented in
+ ;; base-target-features.lisp-expr:
+ (*shebang-features* (set-difference *shebang-features*
+ '(:sb-propagate-float-type
+ :sb-propagate-fun-type))))
(with-additional-nickname ("SB-XC" "SB!XC")
(funcall fn))))
-(compile 'in-host-compilation-mode)
+;;; FIXME: This COMPILE caused problems in sbcl-0.6.11.26. (bug 93)
+;;;(compile 'in-host-compilation-mode)
;;; Process a file as source code for the cross-compiler, compiling it
;;; (if necessary) in the appropriate environment, then loading it
(load (in-host-compilation-mode
(lambda ()
(compile-stem stem
- :src-prefix *src-prefix*
:obj-prefix *host-obj-prefix*
:obj-suffix *host-obj-suffix*
:compile-file #'cl:compile-file
(load (concatenate 'simple-string *host-obj-prefix* stem *host-obj-suffix*)))
(compile 'host-load-stem)
\f
-;;;; compiling SBCL sources to create object files which will be used
-;;;; to create the target SBCL .core file
+;;;; tools to compile SBCL sources to create object files which will
+;;;; be used to create the target SBCL .core file
;;; Run the cross-compiler on a file in the source directory tree to
;;; produce a corresponding file in the target object directory tree.
(funcall *in-target-compilation-mode-fn*
(lambda ()
(compile-stem stem
- :src-prefix *src-prefix*
:obj-prefix *target-obj-prefix*
:obj-suffix *target-obj-suffix*
:ignore-failure-p ignore-failure-p