From 8ff8b301c5791435ac882a6b292088075fd08a8e Mon Sep 17 00:00:00 2001
From: gerd <gerd>
Date: Sat, 15 Feb 2003 12:54:03 +0000
Subject: [PATCH] Boot file for changing the fasl file version numbers to 18e.

---
 bootfiles/18d/boot8.lisp | 59 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 bootfiles/18d/boot8.lisp

diff --git a/bootfiles/18d/boot8.lisp b/bootfiles/18d/boot8.lisp
new file mode 100644
index 000000000..121ff15e8
--- /dev/null
+++ b/bootfiles/18d/boot8.lisp
@@ -0,0 +1,59 @@
+;;;;
+;;;; Boot file for changing the fasl file version numbers to 18e.
+;;;;
+
+(in-package :c)
+
+;;;
+;;; Note that BYTE-FASL-FILE-VERSION is a constant.
+;;;
+(setf (symbol-value 'byte-fasl-file-version)       #x18e)
+(setf (backend-fasl-file-version *target-backend*) #x18e)
+
+;;;
+;;; Don't check fasl versions in the compiling Lisp because we'll
+;;; load files compiled with the new version numbers.
+;;;
+(setq cl::*skip-fasl-file-version-check* t)
+
+;;;
+;;; This is here because BYTE-FASL-FILE-VERSION is constant-folded in
+;;; OPEN-FASL-FILE.  To make the new version number take effect, we
+;;; have to redefine the function.
+;;;
+(defun open-fasl-file (name where &optional byte-p)
+  (declare (type pathname name))
+  (let* ((stream (open name :direction :output
+		       :if-exists :new-version
+		       :element-type '(unsigned-byte 8)))
+	 (res (make-fasl-file :stream stream)))
+    (multiple-value-bind
+	(version f-vers f-imp)
+	(if byte-p
+	    (values "Byte code"
+		    byte-fasl-file-version
+		    (backend-byte-fasl-file-implementation *backend*))
+	    (values (backend-version *backend*)
+		    (backend-fasl-file-version *backend*)
+		    (backend-fasl-file-implementation *backend*)))
+      (format stream
+	      "FASL FILE output from ~A.~@
+	       Compiled ~A on ~A~@
+	       Compiler ~A, Lisp ~A~@
+	       Targeted for ~A, FASL version ~X~%"
+	      where
+	      (ext:format-universal-time nil (get-universal-time))
+	      (machine-instance) compiler-version
+	      (lisp-implementation-version)
+	      version f-vers)
+      ;;
+      ;; Terminate header.
+      (dump-byte 255 res)
+      ;;
+      ;; Specify code format.
+      (dump-fop 'lisp::fop-long-code-format res)
+      (dump-byte f-imp res)
+      (dump-unsigned-32 f-vers res))
+    res))
+
+;;;; end of boot8.lisp
-- 
GitLab