From 0c192befb143e22736d77ce6f2b3c8be47d9eb7a Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Wed, 20 Mar 1991 23:52:14 +0000
Subject: [PATCH] Changed to get the name of the VM package from the backend
 instead of assuming that it's a pmax.  Only load files if we are
 bootstrapping.

---
 tools/comcom.lisp | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/tools/comcom.lisp b/tools/comcom.lisp
index 512ae9601..cd5c26995 100644
--- a/tools/comcom.lisp
+++ b/tools/comcom.lisp
@@ -3,10 +3,12 @@
 (in-package "USER")
 
 #+bootstrap
-(copy-packages '("ASSEM" "MIPS" "C"))
+(copy-packages (cons (c::backend-name c::*target-backend*) '("ASSEM" "C")))
 #+bootstrap
 (export '(assem::nop) "ASSEM")
 
+(defparameter *load-stuff* #+bootstrap t #-bootstrap nil)
+
 ;;; Import so that these types which appear in the globldb are the same...
 #+bootstrap
 (import '(old-c::approximate-function-type
@@ -18,9 +20,9 @@
 
 (declaim (optimize (speed 2) (space 2) (inhibit-warnings 2)))
 
-(comf "target:compiler/macros" :load t)
-(comf "target:compiler/generic/vm-macs" :load t :proceed t)
-(comf "target:compiler/backend" :load t :proceed t)
+(comf "target:compiler/macros" :load *load-stuff*)
+(comf "target:compiler/generic/vm-macs" :load *load-stuff* :proceed t)
+(comf "target:compiler/backend" :load *load-stuff* :proceed t)
 
 (defvar c::*target-backend* (c::make-backend))
 
@@ -42,7 +44,7 @@
 (comf "target:compiler/node")
 (comf "target:compiler/ctype")
 (comf "target:compiler/vop" :proceed t)
-(comf "target:compiler/vmdef" :load t :proceed t)
+(comf "target:compiler/vmdef" :load *load-stuff* :proceed t)
 
 (comf "target:compiler/assembler" :proceed t) 
 (comf "target:compiler/alloc")
@@ -75,14 +77,14 @@
 
 (comf "target:compiler/debug-dump")
 (comf "target:compiler/generic/utils")
-(comf "target:assembly/assemfile" :load t)
+(comf "target:assembly/assemfile" :load *load-stuff*)
 
 (when (string= (old-c:backend-name old-c:*backend*) "PMAX")
   (comf "target:compiler/mips/mips-insts")
-  (comf "target:compiler/mips/mips-macs" :load t)
+  (comf "target:compiler/mips/mips-macs" :load *load-stuff*)
   (comf "target:compiler/mips/vm")
   (comf "target:compiler/generic/primtype")
-  (comf "target:assembly/mips/support" :load t)
+  (comf "target:assembly/mips/support" :load *load-stuff*)
   (comf "target:compiler/mips/move")
   (comf "target:compiler/mips/sap")
   (comf "target:compiler/mips/system")
@@ -112,7 +114,7 @@
 
 (when (string= (old-c:backend-name old-c:*backend*) "SPARC")
   (comf "target:compiler/sparc/insts")
-  (comf "target:compiler/sparc/macros" :load t)
+  (comf "target:compiler/sparc/macros" :load *load-stuff*)
   (comf "target:compiler/sparc/vm")
   (comf "target:compiler/generic/primtype")
   (comf "target:compiler/sparc/move")
@@ -136,7 +138,7 @@
   (comf "target:compiler/sparc/pred")
   (comf "target:compiler/sparc/type-vops")
 
-  (comf "target:assembly/sparc/support")
+  (comf "target:assembly/sparc/support" :load *load-stuff*)
   (comf "target:assembly/sparc/assem-rtns")
   (comf "target:assembly/sparc/bit-bash")
   (comf "target:assembly/sparc/array")
-- 
GitLab