(defvar *host-obj-prefix*)
(defvar *target-obj-prefix*)
-;;; suffixes for filename stems when cross-compiling
-(defvar *host-obj-suffix*
- (or
- ;; On some xc hosts, it's impossible to LOAD a fasl file unless it
- ;; has the same extension that the host uses for COMPILE-FILE
- ;; output, so we have to be careful to use the xc host's preferred
- ;; extension.
- ;;
- ;; FIXME: This is a little ugly and annoying to maintain. And
- ;; there's very likely some way to rearrange the build process so
- ;; that we never explicitly refer to host object file suffixes,
- ;; only to the result of CL:COMPILE-FILE-PATHNAME.
- #+lispworks ".ufsl" ; as per Lieven Marchand sbcl-devel 2002-02-01
- #+(and openmcl (not darwin)) ".pfsl"
- #+(and openmcl darwin) ".dfsl"
- ;; On most xc hosts, any old extension works, so we use an
- ;; arbitrary one.
- ".lisp-obj"))
(defvar *target-obj-suffix*
;; Target fasl files are LOADed (actually only quasi-LOADed, in
;; GENESIS) only by SBCL code, and it doesn't care about particular
(setf *shebang-features*
(let* ((default-features
(append (read-from-file "base-target-features.lisp-expr")
- (read-from-file "local-target-features.lisp-expr")))
+ (eval (read-from-file "local-target-features.lisp-expr"))))
(customizer-file-name "customize-target-features.lisp")
(customizer (if (probe-file customizer-file-name)
(compile nil
(format t
"target backend-subfeatures *SHEBANG-BACKEND-FEATURES*=~@<~S~:>~%"
*shebang-backend-subfeatures*))
+
+;;; Some feature combinations simply don't work, and sometimes don't
+;;; fail until quite a ways into the build. Pick off the more obvious
+;;; combinations now, and provide a description of what the actual
+;;; failure is (not always obvious from when the build fails).
+(let ((feature-compatability-tests
+ '(("(and sb-thread (not gencgc))"
+ ":SB-THREAD requires :GENCGC")
+ ("(and sb-thread (not (or ppc x86 x86-64)))"
+ ":SB-THREAD not supported on selected architecture")
+ ("(and gencgc cheneygc)"
+ ":GENCGC and :CHENEYGC are incompatible")
+ ("(and cheneygc (not (or alpha hppa mips ppc sparc)))"
+ ":CHENEYGC not supported on selected architecture")
+ ("(and gencgc (not (or ppc x86 x86-64)))"
+ ":GENCGC not supported on selected architecture")
+ ("(not (or gencgc cheneygc))"
+ "One of :GENCGC or :CHENEYGC must be enabled")
+ ("(or (and alpha (or hppa mips ppc sparc x86 x86-64))
+ (and hppa (or mips ppc sparc x86 x86-64))
+ (and mips (or ppc sparc x86 x86-64))
+ (and ppc (or sparc x86 x86-64))
+ (and sparc (or x86 x86-64))
+ (and x86 x86-64))"
+ "More than one architecture selected")))
+ (failed-test-descriptions nil))
+ (dolist (test feature-compatability-tests)
+ (let ((*features* *shebang-features*))
+ (when (read-from-string (concatenate 'string "#+" (first test) "T NIL"))
+ (push (second test) failed-test-descriptions))))
+ (when failed-test-descriptions
+ (error "Feature compatability check failed, ~S"
+ failed-test-descriptions)))
\f
;;;; cold-init-related PACKAGE and SYMBOL tools
(multiple-value-bind
(obj-prefix obj-suffix)
(ecase mode
- (:host-compile (values *host-obj-prefix* *host-obj-suffix*))
+ (:host-compile
+ ;; On some xc hosts, it's impossible to LOAD a fasl file unless it
+ ;; has the same extension that the host uses for COMPILE-FILE
+ ;; output, so we have to be careful to use the xc host's preferred
+ ;; extension.
+ (values *host-obj-prefix*
+ (concatenate 'string "."
+ (pathname-type (compile-file-pathname stem)))))
(:target-compile (values *target-obj-prefix*
(if (find :assem flags)
*target-assem-obj-suffix*