diff options
Diffstat (limited to 'meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch')
-rw-r--r-- | meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch b/meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch new file mode 100644 index 0000000000..b81f02e82a --- /dev/null +++ b/meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | commit f3b312a19d70293d7a3407fc4ef479183edd7cca | ||
2 | Author: Ludovic Courtès <ludo@gnu.org> | ||
3 | Date: Wed Jun 20 01:11:44 2012 +0200 | ||
4 | |||
5 | Fix cross-compilation of GOOPS-using code. | ||
6 | |||
7 | Fixes <http://bugs.gnu.org/11645>. | ||
8 | Reported by Bogdan A. Marinescu <bogdan.a.marinescu@intel.com>. | ||
9 | |||
10 | * module/oop/goops/dispatch.scm (compute-dispatch-procedure)[comp]: | ||
11 | Wrap `compile' call in (with-target %host-type ...). | ||
12 | |||
13 | Upstream-Status: Backported | ||
14 | |||
15 | diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm | ||
16 | index b12ab15..de5359f 100644 | ||
17 | --- a/module/oop/goops/dispatch.scm | ||
18 | +++ b/module/oop/goops/dispatch.scm | ||
19 | @@ -25,6 +25,7 @@ | ||
20 | #:use-module (oop goops) | ||
21 | #:use-module (oop goops util) | ||
22 | #:use-module (oop goops compile) | ||
23 | + #:use-module (system base target) | ||
24 | #:export (memoize-method!) | ||
25 | #:no-backtrace) | ||
26 | |||
27 | @@ -178,11 +179,15 @@ | ||
28 | '()) | ||
29 | (acons gf gf-sym '())))) | ||
30 | (define (comp exp vals) | ||
31 | - (let ((p ((@ (system base compile) compile) exp | ||
32 | - #:env *dispatch-module* | ||
33 | - #:opts '(#:partial-eval? #f #:cse? #f)))) | ||
34 | - (apply p vals))) | ||
35 | - | ||
36 | + ;; When cross-compiling Guile itself, the native Guile must generate | ||
37 | + ;; code for the host. | ||
38 | + (with-target %host-type | ||
39 | + (lambda () | ||
40 | + (let ((p ((@ (system base compile) compile) exp | ||
41 | + #:env *dispatch-module* | ||
42 | + #:opts '(#:partial-eval? #f #:cse? #f)))) | ||
43 | + (apply p vals))))) | ||
44 | + | ||
45 | ;; kick it. | ||
46 | (scan)) | ||
47 | |||