summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/guile
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/guile')
-rw-r--r--meta/recipes-devtools/guile/files/arm_endianness.patch23
-rw-r--r--meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch39
-rw-r--r--meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch33
-rw-r--r--meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch24
-rw-r--r--meta/recipes-devtools/guile/files/libguile-Makefile.am-depends.patch39
-rw-r--r--meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch39
-rw-r--r--meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch49
-rw-r--r--meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch60
-rw-r--r--meta/recipes-devtools/guile/guile_2.0.11.bb105
9 files changed, 411 insertions, 0 deletions
diff --git a/meta/recipes-devtools/guile/files/arm_endianness.patch b/meta/recipes-devtools/guile/files/arm_endianness.patch
new file mode 100644
index 0000000000..ea4328b81d
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/arm_endianness.patch
@@ -0,0 +1,23 @@
1Support form ARM endianness
2
3Fixes Yocto bug# 2729
4
5Signed-off-by: Khem Raj <raj.khem@gmail.com>
6
7Upstream-Status: Pending
8
9Index: guile-2.0.5/module/system/base/target.scm
10===================================================================
11--- guile-2.0.5.orig/module/system/base/target.scm 2012-01-24 03:06:06.000000000 -0800
12+++ guile-2.0.5/module/system/base/target.scm 2012-07-12 13:05:44.372364103 -0700
13@@ -70,7 +70,9 @@
14 ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
15 "mips" "mips64"))
16 (endianness big))
17- ((string-match "^arm.*el" cpu)
18+ ((string-match "^arm.*eb" cpu)
19+ (endianness big))
20+ ((string-match "^arm.*" cpu)
21 (endianness little))
22 (else
23 (error "unknown CPU endianness" cpu)))))
diff --git a/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch b/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
new file mode 100644
index 0000000000..43238a7d2e
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch
@@ -0,0 +1,39 @@
1Upstream-Status: Inappropriate [debian patch]
2
3Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
4
5From e52bfcdbaca5dce498678d8f512381e3e39a4066 Mon Sep 17 00:00:00 2001
6From: Rob Browning <rlb@defaultvalue.org>
7Date: Sun, 18 Mar 2012 11:40:55 -0500
8Subject: Mark "Unused modules are removed" gc test as unresolved.
9
10As per discussion with upstream, mark this test as unresolved since it
11may produce false negatives, depending on the behavior/timing of the
12garbage collector.
13---
14 test-suite/tests/gc.test | 11 ++++++-----
15 1 files changed, 6 insertions(+), 5 deletions(-)
16
17diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test
18index a969752..8c8e13e 100644
19--- a/test-suite/tests/gc.test
20+++ b/test-suite/tests/gc.test
21@@ -84,11 +84,13 @@
22 ;; one gc round. not sure why.
23
24 (maybe-gc-flakiness
25- (= (let lp ((i 0))
26- (if (guard)
27- (lp (1+ i))
28- i))
29- total))))
30+ (or (= (let lp ((i 0))
31+ (if (guard)
32+ (lp (1+ i))
33+ i))
34+ total)
35+ (throw 'unresolved)))))
36+
37
38 (pass-if "Lexical vars are collectable"
39 (let ((l (compile
diff --git a/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch b/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
new file mode 100644
index 0000000000..34be3b96e7
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch
@@ -0,0 +1,33 @@
1Upstream-Status: Inappropriate [debian patch]
2
3Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
4
5From 848543091d55dddb54a85612155964506d712852 Mon Sep 17 00:00:00 2001
6From: Rob Browning <rlb@defaultvalue.org>
7Date: Sun, 18 Mar 2012 13:28:24 -0500
8Subject: Mark "mutex with owner not retained" threads test as unresolved.
9
10As per discussion with upstream, mark this test as unresolved since it
11may produce false negatives, depending on the behavior/timing of the
12garbage collector.
13---
14 test-suite/tests/threads.test | 6 ++++--
15 1 files changed, 4 insertions(+), 2 deletions(-)
16
17diff --git a/test-suite/tests/threads.test b/test-suite/tests/threads.test
18index 85a7c38..50899cb 100644
19--- a/test-suite/tests/threads.test
20+++ b/test-suite/tests/threads.test
21@@ -414,8 +414,10 @@
22
23 (gc) (gc)
24 (let ((m (g)))
25- (and (mutex? m)
26- (eq? (mutex-owner m) (current-thread)))))))
27+ (or
28+ (and (mutex? m)
29+ (eq? (mutex-owner m) (current-thread)))
30+ (throw 'unresolved))))))
31
32 ;;
33 ;; mutex lock levels
diff --git a/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch b/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
new file mode 100644
index 0000000000..e5dc226370
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/guile_2.0.6_fix_sed_error.patch
@@ -0,0 +1,24 @@
1Upstream-Status: Pending
2
3This fixes sed issue when prefix has / in it, like /usr/local
4
5autoreconf error avoided:
6| sed: -e expression #1, char 9: unknown option to `s'
7| configure.ac:39: error: AC_INIT should be called with package and version arguments
8
9Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
102012/05/01
11
12Index: guile-2.0.5/build-aux/git-version-gen
13===================================================================
14--- guile-2.0.5.orig/build-aux/git-version-gen
15+++ guile-2.0.5/build-aux/git-version-gen
16@@ -187,7 +187,7 @@ else
17 v=UNKNOWN
18 fi
19
20-v=`echo "$v" |sed "s/^$prefix//"`
21+v=`echo "$v" |sed "s#^$prefix##"`
22
23 # Test whether to append the "-dirty" suffix only if the version
24 # string we're using came from git. I.e., skip the test if it's "UNKNOWN"
diff --git a/meta/recipes-devtools/guile/files/libguile-Makefile.am-depends.patch b/meta/recipes-devtools/guile/files/libguile-Makefile.am-depends.patch
new file mode 100644
index 0000000000..1045cbe21c
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/libguile-Makefile.am-depends.patch
@@ -0,0 +1,39 @@
1From 9c4e120a7a87db34d22a50883a5a525170b480d7 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Tue, 6 Jan 2015 23:10:51 -0800
4Subject: [PATCH] libguile/Makefile.am: install-data-hook: depends on
5 install-libLTLIBRARIES
6
7It may install such a file:
8/usr/lib64/libguile-2.0*-gdb.scm
9
10This is because when there is no file in the directory:
11for f in libguile-2.0*; do
12 [snip]
13done
14
15The f would be libguile-2.0* itself.
16
17Upstream-Status: Pending
18
19Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
20---
21 libguile/Makefile.am | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/libguile/Makefile.am b/libguile/Makefile.am
25index 281faac..fe0a3ba 100644
26--- a/libguile/Makefile.am
27+++ b/libguile/Makefile.am
28@@ -449,7 +449,7 @@ EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = _scm.h \
29 install-exec-hook:
30 rm -f $(DESTDIR)$(bindir)/guile-snarf.awk
31
32-install-data-hook: libguile-2.0-gdb.scm
33+install-data-hook: libguile-2.0-gdb.scm install-libLTLIBRARIES
34 @$(MKDIR_P) $(DESTDIR)$(libdir)
35 ## We want to install libguile-2.0-gdb.scm as SOMETHING-gdb.scm.
36 ## SOMETHING is the full name of the final library. We want to ignore
37--
381.7.9.5
39
diff --git a/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch b/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
new file mode 100644
index 0000000000..d3e312f770
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/opensuse/guile-64bit.patch
@@ -0,0 +1,39 @@
1Upstream-Status: Inappropriate [opensuse patch]
2
3Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
4
5Index: guile-2.0.3/libguile/hash.c
6===================================================================
7--- guile-2.0.3.orig/libguile/hash.c 2011-07-06 15:49:59.000000000 -0700
8+++ guile-2.0.3/libguile/hash.c 2012-01-13 21:49:43.332844884 -0800
9@@ -270,7 +270,7 @@ scm_hasher(SCM obj, unsigned long n, siz
10 unsigned long
11 scm_ihashq (SCM obj, unsigned long n)
12 {
13- return (SCM_UNPACK (obj) >> 1) % n;
14+ return ((unsigned long) SCM_UNPACK (obj) >> 1) % n;
15 }
16
17
18@@ -306,7 +306,7 @@ scm_ihashv (SCM obj, unsigned long n)
19 if (SCM_NUMP(obj))
20 return (unsigned long) scm_hasher(obj, n, 10);
21 else
22- return SCM_UNPACK (obj) % n;
23+ return (unsigned long) SCM_UNPACK (obj) % n;
24 }
25
26
27Index: guile-2.0.3/libguile/struct.c
28===================================================================
29--- guile-2.0.3.orig/libguile/struct.c 2011-07-06 15:50:00.000000000 -0700
30+++ guile-2.0.3/libguile/struct.c 2012-01-13 21:49:43.332844884 -0800
31@@ -942,7 +942,7 @@ scm_struct_ihashq (SCM obj, unsigned lon
32 {
33 /* The length of the hash table should be a relative prime it's not
34 necessary to shift down the address. */
35- return SCM_UNPACK (obj) % n;
36+ return (unsigned long) SCM_UNPACK (obj) % n;
37 }
38
39 SCM_DEFINE (scm_struct_vtable_name, "struct-vtable-name", 1, 0, 0,
diff --git a/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch b/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch
new file mode 100644
index 0000000000..e201486284
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/opensuse/guile-turn-off-gc-test.patch
@@ -0,0 +1,49 @@
1Upstream-Status: Inappropriate [opensuse patch]
2
3Signed-Off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
4
5See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10096
6why this test is turned off.
7Index: guile-2.0.3/test-suite/tests/gc.test
8===================================================================
9--- guile-2.0.3.orig/test-suite/tests/gc.test 2011-10-15 09:34:40.000000000 -0700
10+++ guile-2.0.3/test-suite/tests/gc.test 2012-01-13 21:52:10.282540355 -0800
11@@ -65,23 +65,23 @@
12 foo)))
13
14
15-(with-test-prefix "gc"
16- (pass-if "Unused modules are removed"
17- (let* ((guard (make-guardian))
18- (total 1000))
19-
20- (for-each (lambda (x) (guard (make-module))) (iota total))
21+;;(with-test-prefix "gc"
22+;; (pass-if "Unused modules are removed"
23+;; (let* ((guard (make-guardian))
24+;; (total 1000))
25+;;
26+;; (for-each (lambda (x) (guard (make-module))) (iota total))
27
28 ;; Avoid false references to the modules on the stack.
29- (stack-cleanup 20)
30+;; (stack-cleanup 20)
31
32- (gc)
33- (gc) ;; twice: have to kill the weak vectors.
34- (gc) ;; thrice: because the test doesn't succeed with only
35+;; (gc)
36+;; (gc) ;; twice: have to kill the weak vectors.
37+;; (gc) ;; thrice: because the test doesn't succeed with only
38 ;; one gc round. not sure why.
39
40- (= (let lp ((i 0))
41- (if (guard)
42- (lp (1+ i))
43- i))
44- total))))
45+;; (= (let lp ((i 0))
46+;; (if (guard)
47+;; (lp (1+ i))
48+;; i))
49+;; total))))
diff --git a/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch b/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
new file mode 100644
index 0000000000..6c348384a5
--- /dev/null
+++ b/meta/recipes-devtools/guile/files/workaround-ice-ssa-corruption.patch
@@ -0,0 +1,60 @@
1libguile/vm-i-system.c: workaround ice ssa corruption while compiling with option -g -O
2
3While compiling with option -g -O, there was a ssa corruption:
4..
5Unable to coalesce ssa_names 48 and 3476 which are marked as MUST COALESCE.
6sp_48(ab) and sp_3476(ab)
7guile-2.0.11/libguile/vm-engine.c: In function 'vm_debug_engine':
8guile-2.0.11/libguile/vm.c:673:19: internal compiler error: SSA corruption
9 #define VM_NAME vm_debug_engine
10 ^
11guile-2.0.11/libguile/vm-engine.c:39:1: note: in expansion of macro 'VM_NAME'
12 VM_NAME (SCM vm, SCM program, SCM *argv, int nargs)
13 ^
14Please submit a full bug report,
15with preprocessed source if appropriate.
16See <http://gcc.gnu.org/bugs.html> for instructions.
17...
18
19Tweak libguile/vm-i-system.c to add boundary value check to workaround it.
20
21Upstream-Status: Pending
22
23Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
24---
25 libguile/vm-i-system.c | 20 ++++++++++++++++----
26 1 file changed, 16 insertions(+), 4 deletions(-)
27
28diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c
29--- a/libguile/vm-i-system.c
30+++ b/libguile/vm-i-system.c
31@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6,
32 /* now shuffle up, from walk to ntotal */
33 {
34 scm_t_ptrdiff nshuf = sp - walk + 1, i;
35- sp = (fp - 1) + ntotal + nshuf;
36- CHECK_OVERFLOW ();
37- for (i = 0; i < nshuf; i++)
38- sp[-i] = walk[nshuf-i-1];
39+ /* check the value of nshuf to workaround ice ssa corruption */
40+ /* while compiling with -O -g */
41+ if (nshuf > 0)
42+ {
43+ sp = (fp - 1) + ntotal + nshuf;
44+ CHECK_OVERFLOW ();
45+ for (i = 0; i < nshuf; i++)
46+ sp[-i] = walk[nshuf-i-1];
47+ }
48+ else
49+ {
50+ sp = (fp - 1) + ntotal + nshuf;
51+ CHECK_OVERFLOW ();
52+ for (i = 0; i < nshuf; i++)
53+ sp[-i] = walk[nshuf-i-1];
54+ }
55 }
56 /* and fill optionals & keyword args with SCM_UNDEFINED */
57 while (walk <= (fp - 1) + ntotal)
58--
591.9.1
60
diff --git a/meta/recipes-devtools/guile/guile_2.0.11.bb b/meta/recipes-devtools/guile/guile_2.0.11.bb
new file mode 100644
index 0000000000..8fda850fc2
--- /dev/null
+++ b/meta/recipes-devtools/guile/guile_2.0.11.bb
@@ -0,0 +1,105 @@
1SUMMARY = "Guile is the GNU Ubiquitous Intelligent Language for Extensions"
2DESCRIPTION = "Guile is the GNU Ubiquitous Intelligent Language for Extensions,\
3 the official extension language for the GNU operating system.\
4 Guile is a library designed to help programmers create flexible applications.\
5 Using Guile in an application allows the application's functionality to be\
6 extended by users or other programmers with plug-ins, modules, or scripts.\
7 Guile provides what might be described as 'practical software freedom,'\
8 making it possible for users to customize an application to meet their\
9 needs without digging into the application's internals."
10
11HOMEPAGE = "http://www.gnu.org/software/guile/"
12SECTION = "devel"
13LICENSE = "GPLv3"
14LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
15
16SRC_URI = "${GNU_MIRROR}/guile/guile-${PV}.tar.xz \
17 file://debian/0002-Mark-Unused-modules-are-removed-gc-test-as-unresolve.patch \
18 file://debian/0003-Mark-mutex-with-owner-not-retained-threads-test-as-u.patch \
19 file://opensuse/guile-64bit.patch \
20 file://guile_2.0.6_fix_sed_error.patch \
21 file://arm_endianness.patch \
22 file://workaround-ice-ssa-corruption.patch \
23 file://libguile-Makefile.am-depends.patch \
24 "
25
26# file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
27# file://opensuse/guile-turn-off-gc-test.patch
28
29SRC_URI[md5sum] = "03f1bce1a4983076d955003472306a13"
30SRC_URI[sha256sum] = "aed0a4a6db4e310cbdfeb3613fa6f86fddc91ef624c1e3f8937a6304c69103e2"
31
32
33inherit autotools gettext pkgconfig texinfo
34BBCLASSEXTEND = "native"
35
36DEPENDS = "libunistring bdwgc gmp libtool libffi ncurses readline"
37# add guile-native only to the target recipe's DEPENDS
38DEPENDS_append_class-target = " guile-native libatomics-ops"
39
40RDEPENDS_${PN}_append_libc-glibc_class-target = "glibc-gconv-iso8859-1"
41
42EXTRA_OECONF += "${@['--without-libltdl-prefix --without-libgmp-prefix --without-libreadline-prefix', ''][bb.data.inherits_class('native',d)]}"
43
44do_configure_prepend() {
45 mkdir -p po
46}
47
48export GUILE_FOR_BUILD="${BUILD_SYS}-guile"
49
50do_compile_append() {
51 # just for target recipe
52 if [ "${PN}" = "guile" ]
53 then
54 sed -i -e s:${STAGING_DIR_TARGET}::g \
55 -e s:/${TARGET_SYS}::g \
56 -e s:-L/usr/lib::g \
57 -e s:-isystem/usr/include::g \
58 -e s:,/usr/lib:,\$\{libdir\}:g \
59 meta/guile-2.0.pc
60 fi
61}
62
63do_install_append_class-native() {
64 install -m 0755 ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
65
66 create_wrapper ${D}/${bindir}/guile \
67 GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
68 GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
69 create_wrapper ${D}${bindir}/${HOST_SYS}-guile \
70 GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
71 GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
72}
73
74SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
75
76guile_cross_config() {
77 # this is only for target recipe
78 if [ "${PN}" = "guile" ]
79 then
80 # Create guile-config returning target values instead of native values
81 install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}
82 echo '#!'`which ${BUILD_SYS}-guile`$' \\\n--no-auto-compile -e main -s\n!#\n(define %guile-build-info '\'\( \
83 > guile-config.cross
84 sed -n -e 's:^[ \t]*{[ \t]*": (:' \
85 -e 's:",[ \t]*": . ":' \
86 -e 's:" *}, *\\:"):' \
87 -e 's:^.*cachedir.*$::' \
88 -e '/^ (/p' \
89 < libguile/libpath.h >> guile-config.cross
90 echo '))' >> guile-config.cross
91 cat meta/guile-config >> guile-config.cross
92 install guile-config.cross ${STAGING_BINDIR_CROSS}/guile-config
93 fi
94}
95
96# Guile needs the compiled files to be newer than the source, and it won't
97# auto-compile into the prefix even if it can write there, so touch them here as
98# sysroot is managed.
99SSTATEPOSTINSTFUNCS += "guile_sstate_postinst"
100guile_sstate_postinst() {
101 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
102 then
103 find ${STAGING_DIR_TARGET}/${libdir}/guile/2.0/ccache -type f | xargs touch
104 fi
105}