;;; cross-compilation host Common Lisp.
(defun load-or-cload-xcompiler (load-or-cload-stem)
+ (format t "~&/entering LOAD-OR-CLOAD-XCOMPILER~%") ; REMOVEME
+
;; The running-in-the-host-Lisp Python cross-compiler defines its
;; own versions of a number of functions which should not overwrite
;; host-Lisp functions. Instead we put them in a special package.
;; compilation of the target.
(let ((package-name "SB-XC"))
(make-package package-name :use nil :nicknames nil)
- (dolist (name '("*COMPILE-FILE-PATHNAME*"
- "*COMPILE-FILE-TRUENAME*"
- "*COMPILE-PRINT*"
- "*COMPILE-VERBOSE*"
- "ARRAY-RANK-LIMIT"
+ (dolist (name '(;; the constants (except for T and NIL which have
+ ;; a specially hacked correspondence between
+ ;; cross-compilation host Lisp and target Lisp)
"ARRAY-DIMENSION-LIMIT"
- "ARRAY-TOTAL-SIZE-LIMIT"
+ "ARRAY-RANK-LIMIT"
+ "ARRAY-TOTAL-SIZE-LIMIT"
+ "BOOLE-1"
+ "BOOLE-2"
+ "BOOLE-AND"
+ "BOOLE-ANDC1"
+ "BOOLE-ANDC2"
+ "BOOLE-C1"
+ "BOOLE-C2"
+ "BOOLE-CLR"
+ "BOOLE-EQV"
+ "BOOLE-IOR"
+ "BOOLE-NAND"
+ "BOOLE-NOR"
+ "BOOLE-ORC1"
+ "BOOLE-ORC2"
+ "BOOLE-SET"
+ "BOOLE-XOR"
+ "CALL-ARGUMENTS-LIMIT"
+ "CHAR-CODE-LIMIT"
+ "DOUBLE-FLOAT-EPSILON"
+ "DOUBLE-FLOAT-NEGATIVE-EPSILON"
+ "INTERNAL-TIME-UNITS-PER-SECOND"
+ "LAMBDA-LIST-KEYWORDS"
+ "LAMBDA-PARAMETERS-LIMIT"
+ "LEAST-NEGATIVE-DOUBLE-FLOAT"
+ "LEAST-NEGATIVE-LONG-FLOAT"
+ "LEAST-NEGATIVE-NORMALIZED-DOUBLE-FLOAT"
+ "LEAST-NEGATIVE-NORMALIZED-LONG-FLOAT"
+ "LEAST-NEGATIVE-NORMALIZED-SHORT-FLOAT"
+ "LEAST-NEGATIVE-NORMALIZED-SINGLE-FLOAT"
+ "LEAST-NEGATIVE-SHORT-FLOAT"
+ "LEAST-NEGATIVE-SINGLE-FLOAT"
+ "LEAST-POSITIVE-DOUBLE-FLOAT"
+ "LEAST-POSITIVE-LONG-FLOAT"
+ "LEAST-POSITIVE-NORMALIZED-DOUBLE-FLOAT"
+ "LEAST-POSITIVE-NORMALIZED-LONG-FLOAT"
+ "LEAST-POSITIVE-NORMALIZED-SHORT-FLOAT"
+ "LEAST-POSITIVE-NORMALIZED-SINGLE-FLOAT"
+ "LEAST-POSITIVE-SHORT-FLOAT"
+ "LEAST-POSITIVE-SINGLE-FLOAT"
+ "LONG-FLOAT-EPSILON"
+ "LONG-FLOAT-NEGATIVE-EPSILON"
+ "MOST-NEGATIVE-DOUBLE-FLOAT"
+ "MOST-NEGATIVE-FIXNUM"
+ "MOST-NEGATIVE-LONG-FLOAT"
+ "MOST-NEGATIVE-SHORT-FLOAT"
+ "MOST-NEGATIVE-SINGLE-FLOAT"
+ "MOST-POSITIVE-DOUBLE-FLOAT"
+ "MOST-POSITIVE-FIXNUM"
+ "MOST-POSITIVE-LONG-FLOAT"
+ "MOST-POSITIVE-SHORT-FLOAT"
+ "MOST-POSITIVE-SINGLE-FLOAT"
+ "MULTIPLE-VALUES-LIMIT"
+ "PI"
+ "SHORT-FLOAT-EPSILON"
+ "SHORT-FLOAT-NEGATIVE-EPSILON"
+ "SINGLE-FLOAT-EPSILON"
+ "SINGLE-FLOAT-NEGATIVE-EPSILON"
+
+ ;; everything else which needs a separate
+ ;; existence in xc and target
"BUILT-IN-CLASS"
"CLASS" "CLASS-NAME" "CLASS-OF"
"COMPILE-FILE"
"COMPILE-FILE-PATHNAME"
+ "*COMPILE-FILE-PATHNAME*"
+ "*COMPILE-FILE-TRUENAME*"
+ "*COMPILE-PRINT*"
+ "*COMPILE-VERBOSE*"
"COMPILER-MACRO-FUNCTION"
"CONSTANTP"
"DEFCONSTANT"
"WITH-COMPILATION-UNIT"))
(export (intern name package-name) package-name)))
+ (format t "~&/made SB-XC~%") ; REMOVEME
+
;; Build a version of Python to run in the host Common Lisp, to be
;; used only in cross-compilation.
;;
;; with the ordinary Lisp compiler, and this is intentional, in
;; order to make the compiler aware of the definitions of assembly
;; routines.
- (for-stems-and-flags (stem flags)
+ (do-stems-and-flags (stem flags)
+ (format t "~&/STEM=~S FLAGS=~S~%" stem flags) ; REMOVEME
(unless (find :not-host flags)
+ (format t "~&/FUNCALLing ~S~%" load-or-cload-stem) ; REMOVEME
(funcall load-or-cload-stem
stem
:ignore-failure-p (find :ignore-failure-p flags))
+ (format t "~&/back from FUNCALL~%") ; REMOVEME
#!+sb-show (warn-when-cl-snapshot-diff *cl-snapshot*)))
;; If the cross-compilation host is SBCL itself, we can use the
;; (in the ordinary build procedure anyway) essentially everything
;; which is reachable at this point will remain reachable for the
;; entire run.
+ (format t "~&/doing PURIFY~%") ; REMOVEME
#+sbcl (sb-ext:purify)
(values))