Created attachment 314383 [details, diff] add x32 support The attached patch is needed to make the assembly syntax work with x32. Otherwise the build fails and outputs errors similar to: gc.c:1316: Error: operand type mismatch for `movq'
Could you report this upstream?
(In reply to comment #1) > Could you report this upstream? Yep, I was going to do that shortly. :)
Tim are you sure that suffices to have Ruby _work_? I'm sure it suffices for it to _build_ but that's a different problem. There are other uses of __x86_64__ around the place — I wouldn't be surprised if there were more hardcoding of "the system is 64-bit" on that situation, so I'd really be tempted to say "report this to upstream and we won't bother until a new release is made"...
(In reply to comment #3) > Tim are you sure that suffices to have Ruby _work_? I'm sure it suffices for > it to _build_ but that's a different problem. I have no idea since I'm not a ruby expert. I just focused on getting it to build and all the build tests to pass. > There are other uses of __x86_64__ around the place — I wouldn't be > surprised if there were more hardcoding of "the system is 64-bit" on that > situation, so I'd really be tempted to say "report this to upstream and we > won't bother until a new release is made"... I'm sure there probably are. In no place of my first comment did I say this patch solves every problem. I noted that it simply solves one build time issue.
*** Bug 426388 has been marked as a duplicate of this bug. ***
Why did this bug not pop when I did search for ruby?
This issue still exists in dev-lang/ruby-1.9.3_p429 and hasn't been reported upstream.
Created attachment 355486 [details, diff] ruby-1.9.3_p448-asm-ilp32+volatile.diff The following commit in SVN ruby trunk fix this issue : r39186: * gc.h (SET_MACHINE_STACK_END): use __volatile__ instead of volatile. 40636: * gc.h (SET_MACHINE_STACK_END): Add !defined(_ILP32) to a defining condition to avoid compilation error on x32. https://sites.google.com/site/x32abi/ See Also: https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/39186/diff https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/40636/diff Here is a patch that integrated both of them in one shot. Previous patchs doesn't apply as-is as it have been some update in trunk not reported to 1.9 branches etc..
Ruby 1.9.3-p550 doesn't seem to include your patches. Do you have any feedback from upstream ?
(In reply to Tolga Dalman from comment #9) > Ruby 1.9.3-p550 doesn't seem to include your patches. Do you have any > feedback from upstream ? These patches are available in ruby 2.1.4, so I expect that version to work with x32.
Note that patch is still needed for dev-lang/ruby-1.9.3_p551
We are in the process of masking ruby 1.9 for removal so we will not fix this for ruby 1.9.