summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoshua Lock <joshua.g.lock@intel.com>2017-10-27 15:49:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-11-21 14:43:53 +0000
commit0d44dbdaa8d9028094aa7ee77bf8595a5a9e6f75 (patch)
treedd4cb4e94ae27eed3c07172d2d72f0a1e20bf517 /meta
parent1b231d7b0628c5e19afc2987d25000f71030c000 (diff)
downloadpoky-0d44dbdaa8d9028094aa7ee77bf8595a5a9e6f75.tar.gz
ruby: fix build of ruby-native with gcc7
Marsalling is broken when ruby-2.2.x is built with gcc7, backport the change fix in Ruby SVN r57410 to apply to ruby 2.2.5: https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57410 Fixes [YOCTO #12271] (From OE-Core rev: b9de98cdc816904583970369848181c2c79f1dc5) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/ruby/ruby/prevent-gc.patch32
-rw-r--r--meta/recipes-devtools/ruby/ruby_2.2.5.bb2
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby/prevent-gc.patch b/meta/recipes-devtools/ruby/ruby/prevent-gc.patch
new file mode 100644
index 0000000000..2eaa955fba
--- /dev/null
+++ b/meta/recipes-devtools/ruby/ruby/prevent-gc.patch
@@ -0,0 +1,32 @@
1Fix marshaling with gcc7. Based on upstream revision 57410:
2https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57410
3https://github.com/ruby/ruby/commit/7c1b30a602ab109d8d5388d7dfb3c5b180ba24e1
4https://bugs.ruby-lang.org/issues/13150
5
6with the upstream patches intent ported to Ruby 2.2.5
7
8Upstream-Status: Backport
9
10Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
11
12Index: ruby-2.2.5/marshal.c
13===================================================================
14--- ruby-2.2.5.orig/marshal.c
15+++ ruby-2.2.5/marshal.c
16@@ -17,7 +17,6 @@
17 #include "ruby/io.h"
18 #include "ruby/st.h"
19 #include "ruby/util.h"
20-
21 #include <math.h>
22 #ifdef HAVE_FLOAT_H
23 #include <float.h>
24@@ -985,7 +984,7 @@ marshal_dump(int argc, VALUE *argv)
25 VALUE obj, port, a1, a2;
26 int limit = -1;
27 struct dump_arg *arg;
28- VALUE wrapper; /* used to avoid memory leak in case of exception */
29+ volatile VALUE wrapper; /* used to avoid memory leak in case of exception */
30
31 port = Qnil;
32 rb_scan_args(argc, argv, "12", &obj, &a1, &a2);
diff --git a/meta/recipes-devtools/ruby/ruby_2.2.5.bb b/meta/recipes-devtools/ruby/ruby_2.2.5.bb
index 5a645821ba..66ba1d4b84 100644
--- a/meta/recipes-devtools/ruby/ruby_2.2.5.bb
+++ b/meta/recipes-devtools/ruby/ruby_2.2.5.bb
@@ -3,6 +3,8 @@ require ruby.inc
3SRC_URI[md5sum] = "bd8e349d4fb2c75d90817649674f94be" 3SRC_URI[md5sum] = "bd8e349d4fb2c75d90817649674f94be"
4SRC_URI[sha256sum] = "30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03ca335e3" 4SRC_URI[sha256sum] = "30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03ca335e3"
5 5
6SRC_URI += "file://prevent-gc.patch"
7
6# it's unknown to configure script, but then passed to extconf.rb 8# it's unknown to configure script, but then passed to extconf.rb
7# maybe it's not really needed as we're hardcoding the result with 9# maybe it's not really needed as we're hardcoding the result with
8# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch 10# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch