From: Jan Rękorajski Date: Fri, 2 Jan 2015 14:00:37 +0000 (+0000) Subject: - asm fix for x32 X-Git-Tag: auto/th/ruby-2.0.0.598-4~2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Fruby.git;a=commitdiff_plain;h=ea1548ae9e1220e81b3ad12d4bc78f91f9c11a4a;hp=ba0bcd1d16a2a06283797a726113ff2eb5a41fb7 - asm fix for x32 --- diff --git a/ruby.spec b/ruby.spec index a79ad6e..bfc9a2d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -72,6 +72,7 @@ Patch7: empty-ruby-version.patch Patch8: rubygems-2.0.0-binary-extensions.patch Patch9: custom-rubygems-location.patch Patch10: %{oname}-posixsh.patch +Patch11: x32-asm.patch URL: http://www.ruby-lang.org/ BuildRequires: autoconf >= 2.60 BuildRequires: automake @@ -435,6 +436,7 @@ Biblioteka JSON dla języka Ruby. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 # must be regenerated with new bison %{__rm} parse.{c,h} diff --git a/x32-asm.patch b/x32-asm.patch new file mode 100644 index 0000000..9fb8e87 --- /dev/null +++ b/x32-asm.patch @@ -0,0 +1,16 @@ +Index: ruby1.9.1-1.9.3.484/gc.h +=================================================================== +--- ruby1.9.1-1.9.3.484.orig/gc.h 2014-03-08 07:14:10.672333559 -0800 ++++ ruby1.9.1-1.9.3.484/gc.h 2014-03-08 07:17:00.820079593 -0800 +@@ -3,7 +3,11 @@ + #define RUBY_GC_H 1 + + #if defined(__x86_64__) && defined(__GNUC__) && !defined(__native_client__) ++#ifdef __ILP32__ ++#define SET_MACHINE_STACK_END(p) __asm__ volatile ("movl\t%%esp, %0" : "=r" (*(p))) ++#else + #define SET_MACHINE_STACK_END(p) __asm__ volatile ("movq\t%%rsp, %0" : "=r" (*(p))) ++#endif + #elif defined(__i386) && defined(__GNUC__) && !defined(__native_client__) + #define SET_MACHINE_STACK_END(p) __asm__ volatile ("movl\t%%esp, %0" : "=r" (*(p))) + #else