0.8.5.26:
authorChristophe Rhodes <csr21@cam.ac.uk>
Sat, 8 Nov 2003 15:04:45 +0000 (15:04 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sat, 8 Nov 2003 15:04:45 +0000 (15:04 +0000)
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)

18 files changed:
NEWS
contrib/asdf-install/asdf-install.asd
contrib/asdf-module.mk
contrib/sb-aclrepl/sb-aclrepl.asd
contrib/sb-bsd-sockets/sb-bsd-sockets.asd
contrib/sb-cltl2/sb-cltl2.asd
contrib/sb-executable/sb-executable.lisp
contrib/sb-grovel/sb-grovel.asd
contrib/sb-md5/sb-md5.asd
contrib/sb-posix/sb-posix.asd
contrib/sb-rotate-byte/sb-rotate-byte.asd
contrib/sb-rt/sb-rt.asd
contrib/sb-simple-streams/sb-simple-streams.asd
contrib/vanilla-module.mk
package-data-list.lisp-expr
src/cold/warm.lisp
src/compiler/debug-dump.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 669b6f4..c14cbad 100644 (file)
--- 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
index 6bb4826..91e7282 100644 (file)
@@ -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"))))
index 32626dc..0e5a538 100644 (file)
@@ -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)"
index 9a7a134..8a18b39 100644 (file)
@@ -6,6 +6,8 @@
 (defsystem sb-aclrepl
     :author "Kevin Rosenberg <kevin@rosenberg.net>"
     :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"))
index 87361fb..3c68951 100644 (file)
@@ -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"))
index e6ecbd3..3055a8e 100644 (file)
@@ -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"))
index f785a98..4273d8d 100644 (file)
@@ -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)
index 361bd2e..b1ade29 100644 (file)
@@ -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"))
index 4139247..4144bf0 100644 (file)
@@ -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))))
index 3fead6a..d307ef0 100644 (file)
@@ -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"
index a5d7a72..a445c1f 100644 (file)
@@ -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"))))
 
index a6177a3..9ebb1ae 100644 (file)
@@ -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))))
index 83dac23..39cf6ed 100644 (file)
@@ -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"))
index f8e44ee..b2e5881 100644 (file)
@@ -1,6 +1,6 @@
 
 $(MODULE).fasl: $(MODULE).lisp ../../output/sbcl.core
-       $(SBCL) --eval '(compile-file "$(MODULE)")' </dev/null
+       $(SBCL) --eval '(compile-file (format nil "SYS:CONTRIB;~:@(~A~);~:@(~A~).LISP" "$(MODULE)" "$(MODULE)"))' </dev/null
 
 test:: $(MODULE).fasl
 
index ba5466d..9305dd1 100644 (file)
@@ -783,6 +783,8 @@ retained, possibly temporariliy, because it might be used internally."
             ;; ..and CONDITIONs..
             "BUG"
             "UNSUPPORTED-OPERATOR"
+            "BOOTSTRAP-PACKAGE-NOT-FOUND"
+            "BOOTSTRAP-PACKAGE-NAME" "DEBOOTSTRAP-PACKAGE"
 
              ;; ..and DEFTYPEs..
              "INDEX" "LOAD/STORE-INDEX"
index d02357c..f6892a9 100644 (file)
 \f
 ;;;; compiling and loading more of the system
 
+(let* ((sys *default-pathname-defaults*)
+       (src
+       (merge-pathnames
+        (make-pathname :directory '(:relative "src" :wild-inferiors)
+                       :name :wild :type :wild)
+        sys))
+       (contrib
+       (merge-pathnames
+        (make-pathname :directory '(:relative "contrib" :wild-inferiors)
+                       :name :wild :type :wild)
+        sys)))
+  (setf (logical-pathname-translations "SYS")
+       `(("SYS:SRC;**;*.*.*" ,src)
+         ("SYS:CONTRIB;**;*.*.*" ,contrib))))
+
 ;;; FIXME: CMU CL's pclcom.lisp had extra optional stuff wrapped around
 ;;; COMPILE-PCL, at least some of which we should probably have too:
 ;;;
                ;; order dependencies from the old PCL defsys.lisp
                ;; dependency database.
                #+nil "src/pcl/walk" ; #+NIL = moved to build-order.lisp-expr
-               "src/pcl/early-low"
-               "src/pcl/macros"
-                "src/pcl/compiler-support"
-               "src/pcl/low"
-                "src/pcl/slot-name"
-               "src/pcl/defclass"
-               "src/pcl/defs"
-               "src/pcl/fngen"
-               "src/pcl/cache"
-               "src/pcl/dlisp"
-               "src/pcl/dlisp2"
-               "src/pcl/boot"
-               "src/pcl/vector"
-               "src/pcl/slots-boot"
-               "src/pcl/combin"
-               "src/pcl/dfun"
-               "src/pcl/ctor"
-               "src/pcl/braid"
-               "src/pcl/dlisp3"
-               "src/pcl/generic-functions"
-               "src/pcl/slots"
-               "src/pcl/init"
-               "src/pcl/std-class"
-               "src/pcl/cpl"
-               "src/pcl/fsc"
-               "src/pcl/methods"
-               "src/pcl/fixup"
-               "src/pcl/defcombin"
-               "src/pcl/ctypes"
-               "src/pcl/env"
-               "src/pcl/documentation"
-               "src/pcl/print-object"
-               "src/pcl/precom1"
-               "src/pcl/precom2"
+               "SRC;PCL;EARLY-LOW"
+               "SRC;PCL;MACROS"
+                "SRC;PCL;COMPILER-SUPPORT"
+               "SRC;PCL;LOW"
+                "SRC;PCL;SLOT-NAME"
+               "SRC;PCL;DEFCLASS"
+               "SRC;PCL;DEFS"
+               "SRC;PCL;FNGEN"
+               "SRC;PCL;CACHE"
+               "SRC;PCL;DLISP"
+               "SRC;PCL;DLISP2"
+               "SRC;PCL;BOOT"
+               "SRC;PCL;VECTOR"
+               "SRC;PCL;SLOTS-BOOT"
+               "SRC;PCL;COMBIN"
+               "SRC;PCL;DFUN"
+               "SRC;PCL;CTOR"
+               "SRC;PCL;BRAID"
+               "SRC;PCL;DLISP3"
+               "SRC;PCL;GENERIC-FUNCTIONS"
+               "SRC;PCL;SLOTS"
+               "SRC;PCL;INIT"
+               "SRC;PCL;STD-CLASS"
+               "SRC;PCL;CPL"
+               "SRC;PCL;FSC"
+               "SRC;PCL;METHODS"
+               "SRC;PCL;FIXUP"
+               "SRC;PCL;DEFCOMBIN"
+               "SRC;PCL;CTYPES"
+               "SRC;PCL;ENV"
+               "SRC;PCL;DOCUMENTATION"
+               "SRC;PCL;PRINT-OBJECT"
+               "SRC;PCL;PRECOM1"
+               "SRC;PCL;PRECOM2"
 
                ;; miscellaneous functionality which depends on CLOS
-               "src/code/force-delayed-defbangmethods"
-                "src/code/late-condition"
+               "SRC;CODE;FORCE-DELAYED-DEFBANGMETHODS"
+                "SRC;CODE;LATE-CONDITION"
 
                ;; CLOS-level support for the Gray OO streams
                ;; extension (which is also supported by various
                ;; lower-level hooks elsewhere in the code)
-               "src/pcl/gray-streams-class"
-               "src/pcl/gray-streams"
+               "SRC;PCL;GRAY-STREAMS-CLASS"
+               "SRC;PCL;GRAY-STREAMS"
 
                ;; other functionality not needed for cold init, moved
                ;; to warm init to reduce peak memory requirement in
                ;; cold init
-               "src/code/describe"
-                "src/code/describe-policy"
-               "src/code/inspect"
-               "src/code/profile"
-               "src/code/ntrace"
-               "src/code/foreign"
-               "src/code/run-program"
+               "SRC;CODE;DESCRIBE"
+                "SRC;CODE;DESCRIBE-POLICY"
+               "SRC;CODE;INSPECT"
+               "SRC;CODE;PROFILE"
+               "SRC;CODE;NTRACE"
+               "SRC;CODE;FOREIGN"
+               "SRC;CODE;RUN-PROGRAM"
 
                ;; Code derived from PCL's pre-ANSI DESCRIBE-OBJECT
                ;; facility is still used in our ANSI DESCRIBE
                ;; facility, and should be compiled and loaded after
                ;; our DESCRIBE facility is compiled and loaded.
-               "src/pcl/describe"))
+               "SRC;PCL;DESCRIBE"))
 
-  (let ((fullname (concatenate 'string stem ".lisp")))
+  (let ((fullname (concatenate 'string "SYS:" stem ".LISP")))
     (sb-int:/show "about to compile" fullname)
     (flet ((report-recompile-restart (stream)
              (format stream "Recompile file ~S" fullname))
index 1f58b67..70b9c18 100644 (file)
        (let* ((untruename (file-info-untruename file-info))
              (dir (pathname-directory untruename)))
         (setf (debug-source-name res)
+              #+sb-xc-host
+              (let ((src (position "src" dir :test #'string= :from-end t)))
+                (if src
+                    (format nil "SYS:~{~:@(~A~);~}~:@(~A~).LISP"
+                            (subseq dir src) (pathname-name untruename))
+                    ;; FIXME: just output/stuff-groveled-from-headers.lisp
+                    (namestring untruename)))
+              #-sb-xc-host
               (namestring
                (if (and dir (eq (first dir) :absolute))
                    untruename
index 7aef09a..82bfa93 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.5.25"
+"0.8.5.26"