mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-22 04:30:19 +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:
parent
6b5e918e4f
commit
f3b312a19d
1 changed files with 10 additions and 5 deletions
|
@ -25,6 +25,7 @@
|
||||||
#:use-module (oop goops)
|
#:use-module (oop goops)
|
||||||
#:use-module (oop goops util)
|
#:use-module (oop goops util)
|
||||||
#:use-module (oop goops compile)
|
#:use-module (oop goops compile)
|
||||||
|
#:use-module (system base target)
|
||||||
#:export (memoize-method!)
|
#:export (memoize-method!)
|
||||||
#:no-backtrace)
|
#:no-backtrace)
|
||||||
|
|
||||||
|
@ -178,11 +179,15 @@
|
||||||
'())
|
'())
|
||||||
(acons gf gf-sym '()))))
|
(acons gf gf-sym '()))))
|
||||||
(define (comp exp vals)
|
(define (comp exp vals)
|
||||||
(let ((p ((@ (system base compile) compile) exp
|
;; When cross-compiling Guile itself, the native Guile must generate
|
||||||
#:env *dispatch-module*
|
;; code for the host.
|
||||||
#:opts '(#:partial-eval? #f #:cse? #f))))
|
(with-target %host-type
|
||||||
(apply p vals)))
|
(lambda ()
|
||||||
|
(let ((p ((@ (system base compile) compile) exp
|
||||||
|
#:env *dispatch-module*
|
||||||
|
#:opts '(#:partial-eval? #f #:cse? #f))))
|
||||||
|
(apply p vals)))))
|
||||||
|
|
||||||
;; kick it.
|
;; kick it.
|
||||||
(scan))
|
(scan))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue