summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/guile/files
diff options
context:
space:
mode:
authorBogdan Marinescu <bogdan.a.marinescu@intel.com>2012-06-21 14:39:53 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 14:42:25 +0100
commitb876f42821383bf0069ee49b607ba06614417fba (patch)
tree05e34f4798512938415e70cd6e917573c78c7d2b /meta/recipes-devtools/guile/files
parent6d0b60a15d4ef307d8de90ccd77a2659b9108701 (diff)
downloadpoky-b876f42821383bf0069ee49b607ba06614417fba.tar.gz
guile: fix compilation on MIPS/PPC
This commit fixes the guile compilation segfault on MIPS/PPC. Tested by compiling guile with MACHINE=qemumips. [Yocto #2478] (From OE-Core rev: e2cc4a44d510e0d473d15f207c1c886db6a5ccf7) Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/guile/files')
-rw-r--r--meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch32
-rw-r--r--meta/recipes-devtools/guile/files/guile_2.0.5_fix_cross_compilation.patch47
2 files changed, 79 insertions, 0 deletions
diff --git a/meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch b/meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch
new file mode 100644
index 0000000000..8609775310
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/guile_2.0.5_disable_goops_optimizations.patch
@@ -0,0 +1,32 @@
1commit f7d8efc630ce45f5d82aae5b2682d261e5541d5f
2Author: Andy Wingo <wingo@pobox.com>
3Date: Sun Apr 15 13:00:30 2012 -0700
4
5 disable optimizations in goops dispatch procedures
6
7 * module/oop/goops/dispatch.scm: Disable peval and cse.
8
9Upstream-Status: Backported
10
11diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm
12index e433b86..b12ab15 100644
13--- a/module/oop/goops/dispatch.scm
14+++ b/module/oop/goops/dispatch.scm
15@@ -1,4 +1,4 @@
16-;;;; Copyright (C) 1999, 2000, 2001, 2003, 2006, 2009 Free Software Foundation, Inc.
17+;;;; Copyright (C) 1999, 2000, 2001, 2003, 2006, 2009, 2012 Free Software Foundation, Inc.
18 ;;;;
19 ;;;; This library is free software; you can redistribute it and/or
20 ;;;; modify it under the terms of the GNU Lesser General Public
21@@ -178,7 +178,9 @@
22 '())
23 (acons gf gf-sym '()))))
24 (define (comp exp vals)
25- (let ((p ((@ (system base compile) compile) exp #:env *dispatch-module*)))
26+ (let ((p ((@ (system base compile) compile) exp
27+ #:env *dispatch-module*
28+ #:opts '(#:partial-eval? #f #:cse? #f))))
29 (apply p vals)))
30
31 ;; kick it.
32
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 @@
1commit f3b312a19d70293d7a3407fc4ef479183edd7cca
2Author: Ludovic Courtès <ludo@gnu.org>
3Date: 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
13Upstream-Status: Backported
14
15diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm
16index 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