1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

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>
This commit is contained in:
Joshua Lock
2017-10-27 15:49:41 +01:00
committed by Richard Purdie
parent 1b231d7b06
commit 0d44dbdaa8
2 changed files with 34 additions and 0 deletions
@@ -0,0 +1,32 @@
Fix marshaling with gcc7. Based on upstream revision 57410:
https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57410
https://github.com/ruby/ruby/commit/7c1b30a602ab109d8d5388d7dfb3c5b180ba24e1
https://bugs.ruby-lang.org/issues/13150
with the upstream patches intent ported to Ruby 2.2.5
Upstream-Status: Backport
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Index: ruby-2.2.5/marshal.c
===================================================================
--- ruby-2.2.5.orig/marshal.c
+++ ruby-2.2.5/marshal.c
@@ -17,7 +17,6 @@
#include "ruby/io.h"
#include "ruby/st.h"
#include "ruby/util.h"
-
#include <math.h>
#ifdef HAVE_FLOAT_H
#include <float.h>
@@ -985,7 +984,7 @@ marshal_dump(int argc, VALUE *argv)
VALUE obj, port, a1, a2;
int limit = -1;
struct dump_arg *arg;
- VALUE wrapper; /* used to avoid memory leak in case of exception */
+ volatile VALUE wrapper; /* used to avoid memory leak in case of exception */
port = Qnil;
rb_scan_args(argc, argv, "12", &obj, &a1, &a2);
+2
View File
@@ -3,6 +3,8 @@ require ruby.inc
SRC_URI[md5sum] = "bd8e349d4fb2c75d90817649674f94be"
SRC_URI[sha256sum] = "30c4b31697a4ca4ea0c8db8ad30cf45e6690a0f09687e5d483c933c03ca335e3"
SRC_URI += "file://prevent-gc.patch"
# it's unknown to configure script, but then passed to extconf.rb
# maybe it's not really needed as we're hardcoding the result with
# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch