From 1dfd01f0abbe54dd907985e0f4dfc15543ee4139 Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Mon, 21 Jan 2013 10:20:46 -0500
Subject: [PATCH] 2.26.135: fix argument passing to ECL executables

Have asdf/defsystem's bundle use asdf/driver's image.
---
 TODO              |  1 +
 asdf.asd          |  2 +-
 bundle.lisp       | 27 ++++++++++++---------------
 header.lisp       |  2 +-
 image.lisp        | 33 +++++++++++++++++++--------------
 upgrade.lisp      |  2 +-
 version.lisp-expr |  2 +-
 7 files changed, 36 insertions(+), 33 deletions(-)

diff --git a/TODO b/TODO
index 9961aa737..b87b774d0 100644
--- a/TODO
+++ b/TODO
@@ -1,3 +1,4 @@
+* 2.6.134: fix u (abcl, ccl, clisp, cmucl)
 * Learn to use cl-grid-test, to make sure ASDF changes don't break stuff,
  and that breakage gets fixed quickly.
 * Test stassats's thing:
diff --git a/asdf.asd b/asdf.asd
index 4c9d4a618..59d359c64 100644
--- a/asdf.asd
+++ b/asdf.asd
@@ -15,7 +15,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.26.134" ;; to be automatically updated by make bump-version
+  :version "2.26.135" ;; to be automatically updated by make bump-version
   :depends-on ()
   :components ((:module "build" :components ((:file "asdf"))))
   :in-order-to (#+asdf2.27 (compile-op (monolithic-load-concatenated-source-op asdf/defsystem))))
diff --git a/bundle.lisp b/bundle.lisp
index cc3639b9a..cc4348524 100644
--- a/bundle.lisp
+++ b/bundle.lisp
@@ -455,21 +455,18 @@
   (let* ((object-files (input-files o c))
          (output (output-files o c))
          (bundle (first output))
-         (kind (bundle-type o))
-         (init-name (c::compute-init-name bundle :kind kind)))
-    (apply #'c::builder kind (first output)
-           :init-name init-name
-           :lisp-files (append object-files (bundle-op-lisp-files o))
-           (append (bundle-op-build-args o)
-                   (when (and (typep o 'monolithic-bundle-op)
-                              (monolithic-op-prologue-code o))
-                     `(:prologue-code ,(monolithic-op-prologue-code o)))
-                   (when (typep o 'program-op)
-                     `(:epilogue-code
-                       (restore-image :entry-point ,(component-entry-point c))))
-                   (when (and (typep o 'monolithic-bundle-op)
-                              (monolithic-op-epilogue-code o))
-                     `(:epilogue-code ,(monolithic-op-epilogue-code o)))))))
+         (kind (bundle-type o)))
+    (create-image
+     bundle (append object-files (bundle-op-lisp-files o))
+     :kind kind
+     :entry-point (component-entry-point c)
+     :prologue-code
+     (when (typep o 'monolithic-bundle-op)
+       (monolithic-op-prologue-code o))
+     :epilogue-code
+     (when (typep o 'monolithic-bundle-op)
+       (monolithic-op-epilogue-code o))
+     :build-args (bundle-op-build-args o))))
 
 #+mkcl
 (progn
diff --git a/header.lisp b/header.lisp
index ac7316435..5fd35d9e2 100644
--- a/header.lisp
+++ b/header.lisp
@@ -1,5 +1,5 @@
 ;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*-
-;;; This is ASDF 2.26.134: Another System Definition Facility.
+;;; This is ASDF 2.26.135: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
diff --git a/image.lisp b/image.lisp
index 9eb79349a..2ac9af46f 100644
--- a/image.lisp
+++ b/image.lisp
@@ -202,8 +202,8 @@ This is designed to abstract away the implementation specific quit forms."
 
 (defun* command-line-arguments (&optional (arguments (raw-command-line-arguments)))
   "Extract user arguments from command-line invocation of current process.
-Assume the calling conventions of an XCVB-generated script
-if we are not called from a directly executable image dumped by XCVB."
+Assume the calling conventions of a generated script that uses --
+if we are not called from a directly executable image."
   #+abcl arguments
   #-abcl
   (let* (#-(or sbcl allegro)
@@ -292,22 +292,27 @@ if we are not called from a directly executable image dumped by XCVB."
 
 #+ecl
 (defun create-image (destination object-files
-                     &key kind output-name
-                       (prelude () preludep) (entry-point () entry-point-p))
+                     &key kind output-name prologue-code epilogue-code 
+                       (prelude () preludep) (entry-point () entry-point-p) build-args)
   ;; Is it meaningful to run these in the current environment?
   ;; only if we also track the object files that constitute the "current" image,
   ;; and otherwise simulate dump-image, including quitting at the end.
   ;; (standard-eval-thunk *image-postlude*) (call-image-dump-hook)
-  (check-type kind (member :program :shared-library))
-  (c::builder
-   kind (pathname destination)
-       :lisp-files object-files
-       :init-name (c::compute-init-name (or output-name destination) :kind kind)
-       :epilogue-code
-       (when (eq kind :program)
-         `(restore-image ;; default behavior would be (si::top-level)
-           ,@(when preludep `(:prelude ',prelude))
-           ,@(when entry-point-p `(:entry-point ',entry-point))))))
+  (check-type kind (member :binary :dll :lib :static-library :program :object :fasl :program))
+  (apply 'c::builder
+         kind (pathname destination)
+         :lisp-files object-files
+         :init-name (c::compute-init-name (or output-name destination) :kind kind)
+         :prologue-code prologue-code
+         :epilogue-code
+         `(progn
+            ,epilogue-code
+            ,@(when (eq kind :program)
+                `((setf *image-dumped-p* :executable)
+                  (restore-image ;; default behavior would be (si::top-level)
+                   ,@(when preludep `(:prelude ',prelude))
+                   ,@(when entry-point-p `(:entry-point ',entry-point))))))
+         build-args))
 
 
 ;;; Some universal image restore hooks
diff --git a/upgrade.lisp b/upgrade.lisp
index cc4060ca6..ea90fd380 100644
--- a/upgrade.lisp
+++ b/upgrade.lisp
@@ -35,7 +35,7 @@
          ;; "2.345.6" would be a development version in the official upstream
          ;; "2.345.0.7" would be your seventh local modification of official release 2.345
          ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
-         (asdf-version "2.26.134")
+         (asdf-version "2.26.135")
          (existing-asdf (find-class (find-symbol* :component :asdf nil) nil))
          (existing-version *asdf-version*)
          (already-there (equal asdf-version existing-version))
diff --git a/version.lisp-expr b/version.lisp-expr
index 8c8928fe7..96abedb0c 100644
--- a/version.lisp-expr
+++ b/version.lisp-expr
@@ -1 +1 @@
-"2.26.134"
+"2.26.135"
-- 
GitLab