Skip to content
Snippets Groups Projects
Commit c453dd31 authored by Raymond Toy's avatar Raymond Toy
Browse files

Update ppc cross-compile script.

Copied some things over from the sparc cross-compile script, and added
the needed OLD-VM:CHAR-BYTES.

With these changes, ppc can now do a ppc-to-ppc cross compile.
parent b2b4d88a
No related branches found
No related tags found
No related merge requests found
...@@ -32,10 +32,17 @@ ...@@ -32,10 +32,17 @@
(defun extern-alien-name (name) (defun extern-alien-name (name)
(declare (type simple-string name)) (declare (type simple-string name))
(concatenate 'string "_" name)) (concatenate 'string "_" name))
;; When compiling the compiler, vm:fixup-code-object and
;; vm:sanctify-for-execution are undefined. Import these to get rid
;; of that error.
(import 'old-vm::fixup-code-object)
(import 'old-vm::sanctify-for-execution)
(export 'extern-alien-name) (export 'extern-alien-name)
(export 'fixup-code-object) (export 'fixup-code-object)
(export 'sanctify-for-execution) (export 'sanctify-for-execution)
(in-package :cl-user)
;;; Compile the new backend. ;;; Compile the new backend.
(pushnew :bootstrap *features*) (pushnew :bootstrap *features*)
(pushnew :building-cross-compiler *features*) (pushnew :building-cross-compiler *features*)
...@@ -118,6 +125,8 @@ ...@@ -118,6 +125,8 @@
syms)))) syms))))
(frob OLD-VM:BYTE-BITS OLD-VM:WORD-BITS (frob OLD-VM:BYTE-BITS OLD-VM:WORD-BITS
OLD-VM:CHAR-BITS OLD-VM:CHAR-BITS
OLD-VM:CHAR-BYTES
OLD-VM:LOWTAG-BITS
#+long-float OLD-VM:SIMPLE-ARRAY-LONG-FLOAT-TYPE #+long-float OLD-VM:SIMPLE-ARRAY-LONG-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE OLD-VM:SIMPLE-ARRAY-DOUBLE-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-SINGLE-FLOAT-TYPE OLD-VM:SIMPLE-ARRAY-SINGLE-FLOAT-TYPE
...@@ -136,17 +145,25 @@ ...@@ -136,17 +145,25 @@
OLD-VM:SIMPLE-BIT-VECTOR-TYPE OLD-VM:SIMPLE-BIT-VECTOR-TYPE
OLD-VM:SIMPLE-STRING-TYPE OLD-VM:SIMPLE-VECTOR-TYPE OLD-VM:SIMPLE-STRING-TYPE OLD-VM:SIMPLE-VECTOR-TYPE
OLD-VM:SIMPLE-ARRAY-TYPE OLD-VM:VECTOR-DATA-OFFSET OLD-VM:SIMPLE-ARRAY-TYPE OLD-VM:VECTOR-DATA-OFFSET
OLD-VM:DOUBLE-FLOAT-DIGITS
OLD-VM:DOUBLE-FLOAT-EXPONENT-BYTE OLD-VM:DOUBLE-FLOAT-EXPONENT-BYTE
OLD-VM:DOUBLE-FLOAT-NORMAL-EXPONENT-MAX OLD-VM:DOUBLE-FLOAT-NORMAL-EXPONENT-MAX
OLD-VM:DOUBLE-FLOAT-SIGNIFICAND-BYTE OLD-VM:DOUBLE-FLOAT-SIGNIFICAND-BYTE
OLD-VM:SINGLE-FLOAT-EXPONENT-BYTE OLD-VM:SINGLE-FLOAT-EXPONENT-BYTE
OLD-VM:SINGLE-FLOAT-NORMAL-EXPONENT-MAX OLD-VM:SINGLE-FLOAT-NORMAL-EXPONENT-MAX
OLD-VM:SINGLE-FLOAT-SIGNIFICAND-BYTE OLD-VM:SINGLE-FLOAT-SIGNIFICAND-BYTE
)) )
#+double-double
;; Modular arith hacks (frob OLD-VM:SIMPLE-ARRAY-COMPLEX-DOUBLE-DOUBLE-FLOAT-TYPE
OLD-VM:SIMPLE-ARRAY-DOUBLE-DOUBLE-FLOAT-TYPE)
)
;; Modular arith hacks. When cross-compiling, the compiler wants to
;; constant-fold some stuff, and it needs the following functions to
;; do so. This just gets rid of the hundreds of errors that happen.
(setf (fdefinition 'vm::ash-left-mod32) #'old-ppc::ash-left-mod32) (setf (fdefinition 'vm::ash-left-mod32) #'old-ppc::ash-left-mod32)
(setf (fdefinition 'vm::lognot-mod32) #'old-ppc::lognot-mod32) (setf (fdefinition 'vm::lognot-mod32) #'old-ppc::lognot-mod32)
;; End modular arith hacks
;; Fused multiply hack. Don't know why this is needed for a cross-compile ;; Fused multiply hack. Don't know why this is needed for a cross-compile
(setf (fdefinition 'vm::fused-multiply-add) #'old-ppc::fused-multiply-add) (setf (fdefinition 'vm::fused-multiply-add) #'old-ppc::fused-multiply-add)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment