@IF_CROSS@COMPILER_SETTINGS_CROSS = (set! compiler:cross-compiling? true)
@IF_CROSS@SF_SETTINGS_CROSS = \
@IF_CROSS@ (set! sf/cross-compiling? true) \
-@IF_CROSS@ (set! package/cross-compiling? true)
+@IF_CROSS@ (set! package/cross-compiling? true) \
+@IF_CROSS@ (set! target-bytes-per-object \
+@IF_CROSS@ (lambda () @mit_scheme_target_bytes_per_object@))
@IF_LIARC@COMPILER_SETTINGS_LIARC = (set! compiler:invoke-c-compiler? false)
HOST_COMPILER_HEAP = @HOST_COMPILER_HEAP@
$(COMPILER_SETTINGS_LIARC)
HOST_COMPILER = '$(MIT_SCHEME_EXE)' --batch-mode $(HOST_COMPILER_HEAP) --no-init-file \
- --eval '(begin $(HOST_COMPILER_SETTINGS))' --load runtime/host-adapter.scm
+ --load runtime/host-adapter.scm --eval '(begin $(HOST_COMPILER_SETTINGS))'
HOST_RUNTIME_ONLY = '$(MIT_SCHEME_EXE)' --batch-mode $(HOST_COMPILER_HEAP) \
--band runtime.com --no-init-file --load runtime/host-adapter.scm
AC_CANONICAL_HOST
+AC_CHECK_SIZEOF([unsigned long])
+mit_scheme_target_bytes_per_object=$ac_cv_sizeof_unsigned_long
+
ALL_TARGET=all-native
INSTALL_COM='$(INSTALL_DATA)'
INSTALL_LIARC_BUNDLES=
AC_SUBST([INSTALL_LIARC_BUNDLES])
AC_SUBST([MIT_SCHEME_EXE])
AC_SUBST([mit_scheme_native_code])
+AC_SUBST([mit_scheme_target_bytes_per_object])
AC_SUBST([OPTION_SUBDIRS])
AC_PROG_INSTALL
((ucode-primitive gc-space-status)))
(define (bytes-per-object)
- (vector-ref (gc-space-status) 0))
\ No newline at end of file
+ (vector-ref (gc-space-status) 0))
+
+;;; XXX Cross-compilation kludge: We redefine this to return the
+;;; characteristic of the target system. In the future, macro
+;;; expanders should just see a binding of bytes-per-object that
+;;; reflects the target system.
+
+(define (target-bytes-per-object)
+ (bytes-per-object))
\ No newline at end of file
(lambda (form rename compare)
rename compare
(syntax-check '(_ expression expression) form)
+ ;; XXX This queries the host system rather than the target system.
+ ;; We should expose definitions of fix:fixnum? to macro expanders
+ ;; that reflect the target system instead.
+ #;
(if (fix:fixnum? #xFFFFFFFF)
(cadr form)
- (caddr form)))))
+ (caddr form))
+ ;; XXX For now, we can use the number of bytes per word as a proxy
+ ;; for whether fixnums have 32 bits.
+ `(select-on-bytes-per-word ,(caddr form) ,(cadr form)))))
(select-u32-code
;; Can use fixnums:
;;; the new runtime. It contains temporary hacks that will be kept
;;; only until the new runtime is released.
+(if (lexical-unreferenceable? (->environment '()) 'target-bytes-per-object)
+ (environment-define (->environment '())
+ 'target-bytes-per-object
+ bytes-per-object))
+
unspecific
\ No newline at end of file
set-predicate<=!
simple-parser-method
standard-print-method
+ target-bytes-per-object
weak-car
weak-cdr
weak-cons
(lambda (form rename compare)
(declare (ignore rename compare))
(syntax-check '(_ expression expression) form)
- (let ((bpo (bytes-per-object)))
+ (let ((bpo (target-bytes-per-object)))
(case bpo
((4) (cadr form))
((8) (caddr form))