diff options
author | Bogdan Marinescu <bogdan.a.marinescu@intel.com> | 2012-06-21 14:39:53 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-21 14:42:25 +0100 |
commit | b876f42821383bf0069ee49b607ba06614417fba (patch) | |
tree | 05e34f4798512938415e70cd6e917573c78c7d2b /meta/recipes-devtools | |
parent | 6d0b60a15d4ef307d8de90ccd77a2659b9108701 (diff) | |
download | poky-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')
3 files changed, 82 insertions, 1 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 @@ | |||
1 | commit f7d8efc630ce45f5d82aae5b2682d261e5541d5f | ||
2 | Author: Andy Wingo <wingo@pobox.com> | ||
3 | Date: 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 | |||
9 | Upstream-Status: Backported | ||
10 | |||
11 | diff --git a/module/oop/goops/dispatch.scm b/module/oop/goops/dispatch.scm | ||
12 | index 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 @@ | |||
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 | |||
diff --git a/meta/recipes-devtools/guile/guile_2.0.5.bb b/meta/recipes-devtools/guile/guile_2.0.5.bb index db75863d34..cf222a6f47 100644 --- a/meta/recipes-devtools/guile/guile_2.0.5.bb +++ b/meta/recipes-devtools/guile/guile_2.0.5.bb | |||
@@ -18,6 +18,8 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \ | |||
18 | file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \ | 18 | file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \ |
19 | file://opensuse/guile-64bit.patch \ | 19 | file://opensuse/guile-64bit.patch \ |
20 | file://guile_2.0.5_fix_sed_error.patch \ | 20 | file://guile_2.0.5_fix_sed_error.patch \ |
21 | file://guile_2.0.5_disable_goops_optimizations.patch \ | ||
22 | file://guile_2.0.5_fix_cross_compilation.patch \ | ||
21 | " | 23 | " |
22 | 24 | ||
23 | # file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch | 25 | # file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch |
@@ -26,7 +28,7 @@ SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.gz \ | |||
26 | SRC_URI[md5sum] = "bcf70d54b44c99cb9acd3f63c5486b4b" | 28 | SRC_URI[md5sum] = "bcf70d54b44c99cb9acd3f63c5486b4b" |
27 | SRC_URI[sha256sum] = "2a026ea6cdbc51ca71bcd9787839debfa45ac5db1e26dc00b30ca9b128b10956" | 29 | SRC_URI[sha256sum] = "2a026ea6cdbc51ca71bcd9787839debfa45ac5db1e26dc00b30ca9b128b10956" |
28 | 30 | ||
29 | PR = "r0" | 31 | PR = "r1" |
30 | 32 | ||
31 | inherit autotools gettext | 33 | inherit autotools gettext |
32 | BBCLASSEXTEND = "native" | 34 | BBCLASSEXTEND = "native" |