From 6ffb09605de7f990332aee146d8f69ba4cc907c9 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Sat, 8 Nov 2003 15:04:45 +0000 Subject: [PATCH] 0.8.5.26: Record filesystem information during the build in debug information relative to SYS, not to /home/kevin/sbcl or equivalent. ... change to core code: tiny if ugly; ... change to warm load: only to refer to files as lpns rather than physical namestrings; ... change to vanilla-modules: tiny; ... change to asdf modules: well, erm, less tiny. I'm not pleased by the need to duplicate similar logic in every .asd, but I think it's a similar symptom to the duplication of the TEST-OP logic in many of them: the coupling between asdf and the rest of the system is slightly wrong. (At startup, SYS by default has translations that refer back to the build-time values; distributors may wish to alter this for their binaries, for instance by setting translations to distribution-known values when dumping any final image) --- NEWS | 3 + contrib/asdf-install/asdf-install.asd | 2 + contrib/asdf-module.mk | 1 + contrib/sb-aclrepl/sb-aclrepl.asd | 2 + contrib/sb-bsd-sockets/sb-bsd-sockets.asd | 4 +- contrib/sb-cltl2/sb-cltl2.asd | 6 +- contrib/sb-executable/sb-executable.lisp | 17 ++-- contrib/sb-grovel/sb-grovel.asd | 2 + contrib/sb-md5/sb-md5.asd | 2 + contrib/sb-posix/sb-posix.asd | 2 + contrib/sb-rotate-byte/sb-rotate-byte.asd | 6 +- contrib/sb-rt/sb-rt.asd | 2 + contrib/sb-simple-streams/sb-simple-streams.asd | 2 + contrib/vanilla-module.mk | 2 +- package-data-list.lisp-expr | 2 + src/cold/warm.lisp | 109 +++++++++++++---------- src/compiler/debug-dump.lisp | 8 ++ version.lisp-expr | 2 +- 18 files changed, 115 insertions(+), 59 deletions(-) diff --git a/NEWS b/NEWS index 669b6f4..c14cbad 100644 --- a/NEWS +++ b/NEWS @@ -2176,6 +2176,9 @@ changes in sbcl-0.8.6 relative to sbcl-0.8.5: * the system can now be dynamically linked on the MIPS platform, which enables dynamic loading of foreign code from Lisp. (thanks to Ralf Baechle for discussions on the MIPS ABI) + * the system now records its own debugging information in a + filesystem-position-independent manner, relative to the "SYS" + logical host. * fixed a compiler bug: MV-LET convertion did not check references to the "max args" entry point. (reported by Brian Downing) * tweaked disassembly notes to be less confident about proclaiming diff --git a/contrib/asdf-install/asdf-install.asd b/contrib/asdf-install/asdf-install.asd index 6bb4826..91e7282 100644 --- a/contrib/asdf-install/asdf-install.asd +++ b/contrib/asdf-install/asdf-install.asd @@ -23,6 +23,8 @@ (defsystem asdf-install :depends-on (sb-posix sb-bsd-sockets) :version "0.2" + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;ASDF-INSTALL;" :components ((:file "defpackage") (:exe-file "loader" :depends-on ("installer")) (:file "installer" :depends-on ("defpackage")))) diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk index 32626dc..0e5a538 100644 --- a/contrib/asdf-module.mk +++ b/contrib/asdf-module.mk @@ -5,6 +5,7 @@ all: $(EXTRA_ALL_TARGETS) $(MAKE) -C ../asdf $(SBCL) --eval '(load "../asdf/asdf")' \ --eval "(setf asdf::*central-registry* '((MERGE-PATHNAMES \"systems/\" (TRUENAME (SB-EXT:POSIX-GETENV \"SBCL_HOME\")))))" \ + --eval "(push :sb-building-contrib *features*)" \ --eval "(asdf:operate 'asdf:load-op :$(SYSTEM))" \ --eval "(progn (when (probe-file \"$(SYSTEM).fasl\") (error \"fasl file exists\")) (with-open-file (s \"$(SYSTEM).lisp\" :direction :output :if-exists :error) (print (quote (require :asdf)) s) (print (quote (require :$(SYSTEM))) s)) (compile-file \"$(SYSTEM).lisp\") (delete-file \"$(SYSTEM).lisp\"))" \ --eval "(quit)" diff --git a/contrib/sb-aclrepl/sb-aclrepl.asd b/contrib/sb-aclrepl/sb-aclrepl.asd index 9a7a134..8a18b39 100644 --- a/contrib/sb-aclrepl/sb-aclrepl.asd +++ b/contrib/sb-aclrepl/sb-aclrepl.asd @@ -6,6 +6,8 @@ (defsystem sb-aclrepl :author "Kevin Rosenberg " :description "An AllegroCL compatible REPL" + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-ACLREPL;" :components ((:file "toplevel") (:file "repl" :depends-on ("toplevel")) (:file "inspect" :depends-on ("repl")) diff --git a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd index 87361fb..3c68951 100644 --- a/contrib/sb-bsd-sockets/sb-bsd-sockets.asd +++ b/contrib/sb-bsd-sockets/sb-bsd-sockets.asd @@ -70,6 +70,8 @@ (defsystem sb-bsd-sockets :version "0.58" :depends-on (sb-grovel) + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-BSD-SOCKETS;" :components ((:file "defpackage") (:file "split" :depends-on ("defpackage")) (:file "array-data" :depends-on ("defpackage")) @@ -80,7 +82,7 @@ (:file "foreign-glue" :depends-on ("defpackage" "malloc")) (sb-grovel:grovel-constants-file "constants" - :package :sockint :pathname "constants.lisp" + :package :sockint :depends-on ("def-to-lisp" "defpackage" "foreign-glue")) (:file "sockets" :depends-on ("constants" "array-data")) diff --git a/contrib/sb-cltl2/sb-cltl2.asd b/contrib/sb-cltl2/sb-cltl2.asd index e6ecbd3..3055a8e 100644 --- a/contrib/sb-cltl2/sb-cltl2.asd +++ b/contrib/sb-cltl2/sb-cltl2.asd @@ -1,8 +1,12 @@ +;;; -*- Lisp -*- + (defpackage #:sb-cltl2-system (:use #:asdf #:cl)) (in-package #:sb-cltl2-system) (defsystem sb-cltl2 - :description "Some functionality, mentioned in CLtL2, but not present in ANSI." + :description "Functionality mentioned in CLtL2 but not present in ANSI." + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-CLTL2;" :components ((:file "defpackage") (:file "compiler-let" :depends-on ("defpackage")) (:file "macroexpand" :depends-on ("defpackage")) diff --git a/contrib/sb-executable/sb-executable.lisp b/contrib/sb-executable/sb-executable.lisp index f785a98..4273d8d 100644 --- a/contrib/sb-executable/sb-executable.lisp +++ b/contrib/sb-executable/sb-executable.lisp @@ -40,13 +40,16 @@ exec sbcl --noinform ~{~A ~}--eval \"(with-open-file (i \\\"$0\\\" :element-type (make-pathname :type "fasl")) :element-type '(unsigned-byte 8)) (copy-stream in out)))) - (let* ((out-name (namestring output-file)) + (let* (;; FIXME: use OUT as the pathname designator + (out-name (namestring (translate-logical-pathname output-file))) (prot (elt (multiple-value-list (sb-unix:unix-stat out-name)) 3))) - (sb-unix::void-syscall ("chmod" c-string int) - out-name - (logior prot - (if (logand prot #o400) #o100) - (if (logand prot #o40) #o10) - (if (logand prot #o4) #o1))))) + (if prot + (sb-unix::void-syscall ("chmod" c-string int) + out-name + (logior prot + (if (logand prot #o400) #o100) + (if (logand prot #o40) #o10) + (if (logand prot #o4) #o1))) + (error "stat() call failed")))) (provide 'sb-executable) diff --git a/contrib/sb-grovel/sb-grovel.asd b/contrib/sb-grovel/sb-grovel.asd index 361bd2e..b1ade29 100644 --- a/contrib/sb-grovel/sb-grovel.asd +++ b/contrib/sb-grovel/sb-grovel.asd @@ -5,6 +5,8 @@ (defsystem sb-grovel :version "0.01" + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-GROVEL;" :components ((:file "defpackage") (:file "def-to-lisp" :depends-on ("defpackage")) (:file "foreign-glue" :depends-on ("defpackage")) diff --git a/contrib/sb-md5/sb-md5.asd b/contrib/sb-md5/sb-md5.asd index 4139247..4144bf0 100644 --- a/contrib/sb-md5/sb-md5.asd +++ b/contrib/sb-md5/sb-md5.asd @@ -8,6 +8,8 @@ (defsystem sb-md5 :depends-on (sb-rotate-byte) :version "1.8" + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-MD5;" :components ((:file "md5"))) (defmethod perform :after ((o load-op) (c (eql (find-system :sb-md5)))) diff --git a/contrib/sb-posix/sb-posix.asd b/contrib/sb-posix/sb-posix.asd index 3fead6a..d307ef0 100644 --- a/contrib/sb-posix/sb-posix.asd +++ b/contrib/sb-posix/sb-posix.asd @@ -73,6 +73,8 @@ (defsystem sb-posix :depends-on (sb-grovel) + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-POSIX;" :components ((:file "defpackage") (:file "designator" :depends-on ("defpackage")) (:unix-dso "alien" diff --git a/contrib/sb-rotate-byte/sb-rotate-byte.asd b/contrib/sb-rotate-byte/sb-rotate-byte.asd index a5d7a72..a445c1f 100644 --- a/contrib/sb-rotate-byte/sb-rotate-byte.asd +++ b/contrib/sb-rotate-byte/sb-rotate-byte.asd @@ -6,6 +6,8 @@ (defsystem sb-rotate-byte :version "0.1" + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-ROTATE-BYTE;" :components ((:file "package") (:file "compiler" :depends-on ("package")) @@ -16,7 +18,9 @@ :in-order-to ((compile-op (feature :x86)))) (:file "ppc-vm" :in-order-to ((compile-op (feature :ppc))))) - :pathname #.(make-pathname :directory '(:relative)) + :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-ROTATE-BYTE;" + #-sb-building-contrib #.(make-pathname :directory '(:relative)) :if-component-dep-fails :ignore) (:file "rotate-byte" :depends-on ("compiler")))) diff --git a/contrib/sb-rt/sb-rt.asd b/contrib/sb-rt/sb-rt.asd index a6177a3..9ebb1ae 100644 --- a/contrib/sb-rt/sb-rt.asd +++ b/contrib/sb-rt/sb-rt.asd @@ -6,6 +6,8 @@ (defsystem sb-rt :version "0.1.7" ; our version "0", GCL CVS version "1.7" + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-RT;" :components ((:file "rt"))) (defmethod perform :after ((o load-op) (c (eql (find-system :sb-rt)))) diff --git a/contrib/sb-simple-streams/sb-simple-streams.asd b/contrib/sb-simple-streams/sb-simple-streams.asd index 83dac23..39cf6ed 100644 --- a/contrib/sb-simple-streams/sb-simple-streams.asd +++ b/contrib/sb-simple-streams/sb-simple-streams.asd @@ -6,6 +6,8 @@ (defsystem sb-simple-streams :depends-on (sb-bsd-sockets sb-posix) + #+sb-building-contrib :pathname + #+sb-building-contrib "SYS:CONTRIB;SB-SIMPLE-STREAMS;" :components ((:file "package") (:file "fndb") (:file "iodefs" :depends-on ("package")) diff --git a/contrib/vanilla-module.mk b/contrib/vanilla-module.mk index f8e44ee..b2e5881 100644 --- a/contrib/vanilla-module.mk +++ b/contrib/vanilla-module.mk @@ -1,6 +1,6 @@ $(MODULE).fasl: $(MODULE).lisp ../../output/sbcl.core - $(SBCL) --eval '(compile-file "$(MODULE)")'