anchor.diff:  
   #+(or clasp ecl mkcl)
   (with-upgradability ()
  -  ;; I think that Juanjo intended for this to be, but it was disabled before 3.1
  -  ;; due to implementation bugs in ECL and MKCL that seem to have been fixed since
  -  ;; -- see for ECL test-xach-update-bug.script and test-bundle.script,
  -  ;; and for MKCL test-logical-pathname.script.
  -  ;; We should probably reenable these after consulting with ECL and MKCL maintainers.
  -  ;;(unless (or #+(or clasp ecl) (use-ecl-byte-compiler-p))
  -  ;;  (setf *load-system-operation* 'load-bundle-op))
  -
  -  (defun uiop-library-pathname ()
  -    #+clasp (probe-file* (compile-file-pathname "sys:uiop" :output-type :object))
  -    #+ecl (or (probe-file* (compile-file-pathname "sys:uiop" :type :lib)) ;; new style
  -              (probe-file* (compile-file-pathname "sys:uiop" :type :object))) ;; old style
  -    #+mkcl (make-pathname :type (bundle-pathname-type :lib) :defaults #p"sys:contrib;uiop"))
  -
  -  (defun asdf-library-pathname ()
  -    #+clasp (probe-file* (compile-file-pathname "sys:asdf" :output-type :object))
  -    #+ecl (or (probe-file* (compile-file-pathname "sys:asdf" :type :lib)) ;; new style
  -              (probe-file* (compile-file-pathname "sys:asdf" :type :object))) ;; old style
  -    #+mkcl (make-pathname :type (bundle-pathname-type :lib) :defaults #p"sys:contrib;asdf"))
  -
  -  (defun compiler-library-pathname ()
  -    #+clasp (compile-file-pathname "sys:cmp" :output-type :lib)
  -    #+ecl (compile-file-pathname "sys:cmp" :type :lib)
  -    #+mkcl (make-pathname :type (bundle-pathname-type :lib) :defaults #p"sys:cmp"))
  -
  -  (defun make-library-system (name pathname)
  -    (make-instance 'prebuilt-system
  -                   :name (coerce-name name) :static-library (resolve-symlinks* pathname)))
  +  (defun system-module-pathname (module)
  +    (let ((name (coerce-name module)))
  +      (some
  +       'file-exists-p
  +       (list
  +        #+clasp (compile-file-pathname (make-pathname :name name :defaults "sys:") :output-type :object)
  +        #+ecl (compile-file-pathname (make-pathname :name name :defaults "sys:") :type :lib)
  +        #+ecl (compile-file-pathname (make-pathname :name (strcat "lib" name) :defaults "sys:") :type :lib)
  +        #+ecl (compile-file-pathname (make-pathname :name name :defaults "sys:") :type :object)
  +        #+mkcl (make-pathname :name name :type (bundle-pathname-type :lib) :defaults #p"sys:")
  +        #+mkcl (make-pathname :name name :type (bundle-pathname-type :lib) :defaults #p"sys:contrib;")))))
  +
  +  (defun make-prebuilt-system (name &optional (pathname (system-module-pathname name)))
  +    "Creates a prebuilt-system if PATHNAME isn't NIL."
  +    (when pathname
  +      (make-instance 'prebuilt-system
  +                     :name (coerce-name name)
  +                     :static-library (resolve-symlinks* pathname))))
  +
  +  (defun linkable-system (x)
  +    (or ;; If the system is available as source, use it.
  +        (if-let (s (find-system x))
  +          (and (output-files 'lib-op s) s))
  +        ;; If an ASDF upgrade is available from source, but not a UIOP upgrade to that,
  +        ;; then use the asdf/driver system instead of
  +        ;; the UIOP that was disabled by check-not-old-asdf-system.
  +        (if-let (s (and (equal (coerce-name x) "uiop")
  +                        (output-files 'lib-op "asdf")
  +                        (find-system "asdf/driver")))
  +          (and (output-files 'lib-op s) s))
  +        ;; If there was no source upgrade, look for modules provided by the implementation.
  +        (if-let (p (system-module-pathname (coerce-name x)))
  +          (make-prebuilt-system x p))))
   
     (defmethod component-depends-on :around ((o image-op) (c system))
  -    (destructuring-bind ((lib-op . deps)) (call-next-method)
  -      (flet ((has-it-p (x) (find x deps :test 'equal :key 'coerce-name)))
  -        `((,lib-op
  -           ,@(unless (or (no-uiop c) (has-it-p "cmp"))
  -               `(,(make-library-system
  -                   "cmp" (compiler-library-pathname))))
  -           ,@(unless (or (no-uiop c) (has-it-p "uiop") (has-it-p "asdf"))
  -               (cond
  -                 ((system-source-directory :uiop) `(,(find-system :uiop)))
  -                 ((system-source-directory :asdf) `(,(find-system :asdf)))
  -                 (t `(,@(if-let (uiop (uiop-library-pathname))
  -                          `(,(make-library-system "uiop" uiop)))
  -                      ,(make-library-system "asdf" (asdf-library-pathname))))))
  -           ,@deps)))))
  +    (let* ((next (call-next-method))
  +           (deps (make-hash-table :test 'equal))
  +           (linkable (loop* :for (do . dcs) :in next :collect
  +                       (cons do
  +                             (loop :for dc :in dcs
  +                               :for dep = (and dc (resolve-dependency-spec c dc))
  +                               :when dep
  +                               :do (setf (gethash (coerce-name (component-system dep)) deps) t)
  +                               :collect (or (and (typep dep 'system) (linkable-system dep)) dep))))))
  +        `((lib-op
  +           ,@(unless (no-uiop c)
  +               (list (linkable-system "cmp")
  +                     (unless (or (and (gethash "uiop" deps) (linkable-system "uiop"))
  +                                 (and (gethash "asdf" deps) (linkable-system "asdf")))
  +                       (or (linkable-system "uiop")
  +                           (linkable-system "asdf")
  +                           "asdf")))))
  +          ,@linkable)))
   
     (defmethod perform ((o link-op) (c system))
       (let* ((object-files (input-files o c))
  
positive.code:     (if-let (dw ccl::*outstanding-deferred-warnings*)
        (let ((mdw (ccl::ensure-merged-deferred-warnings dw)))
          (setf (ccl::deferred-warnings.warnings mdw) nil)))
      #+(or cmu scl)
      (when lisp::*in-compilation-unit*
        (setf c::*undefined-warnings* nil
              c::*compiler-error-count* 0
  
negative.code:    #:sub-components
  
     ;; conditions
     #:duplicate-names
  
     ;; Internals we'd like to share with the ASDF package, especially for upgrade purposes
  