1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Fix cross-compilation of GOOPS-using code.

Fixes <http://bugs.gnu.org/11645>.
Reported by Bogdan A. Marinescu <bogdan.a.marinescu@intel.com>.

* module/oop/goops/dispatch.scm (compute-dispatch-procedure)[comp]:
  Wrap `compile' call in (with-target %host-type ...).
This commit is contained in:
Ludovic Courtès 2012-06-20 01:11:44 +02:00
parent 6b5e918e4f
commit f3b312a19d

View file

@ -25,6 +25,7 @@
#:use-module (oop goops)
#:use-module (oop goops util)
#:use-module (oop goops compile)
#:use-module (system base target)
#:export (memoize-method!)
#:no-backtrace)
@ -178,11 +179,15 @@
'())
(acons gf gf-sym '()))))
(define (comp exp vals)
(let ((p ((@ (system base compile) compile) exp
#:env *dispatch-module*
#:opts '(#:partial-eval? #f #:cse? #f))))
(apply p vals)))
;; When cross-compiling Guile itself, the native Guile must generate
;; code for the host.
(with-target %host-type
(lambda ()
(let ((p ((@ (system base compile) compile) exp
#:env *dispatch-module*
#:opts '(#:partial-eval? #f #:cse? #f))))
(apply p vals)))))
;; kick it.
(scan))