Compilation of dev-lang/ruby-2.0.0_p247-r1 for x32 ARCH fail with the following : x86_64-pc-linux-gnux32-gcc -march=native -O2 -pipe -fno-strict-aliasing -fPIC -include ruby/config.h -include ruby/missing.h -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux-x32 -I./include -I. -o gc.o -c gc.c gc.c: In function 'add_slot_local_freelist': gc.c:827:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] gc.c: In function 'slot_sweep': gc.c:1905:27: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] gc.c: In function 'mark_locations_array': gc.c:2322:15: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] gc.c: Assembler messages: gc.c:2281: Error: operand type mismatch for `movq' gc.c:2512: Error: operand type mismatch for `movq' gc.c:2924: Error: operand type mismatch for `movq' make: *** [gc.o] Error 1 Full log attached and emerge --info Reproducible: Always
Created attachment 355392 [details] build.log
Created attachment 355394 [details] emerge --info
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 Both of them attached here
Created attachment 355480 [details, diff] ruby-2.0.0_p247-SVNr39186-asm-volatile.diff $ svn diff -c 39186 gc.h
Created attachment 355482 [details, diff] ruby-2.0.0_p247-SVNr40636-asm-ilp32.diff svn diff -c 40636 gc.h
Can you please test again with dev-lang/ruby-2.0.0_p353 and p481?
(In reply to Manuel Rüger from comment #6) > Can you please test again with dev-lang/ruby-2.0.0_p353 and p481? I continue to maintain the patches on my side for dev-lang/ruby:1.9 and dev-lang/ruby:2.0 as they do not support ABI x32 yet.
Created attachment 378672 [details, diff] ruby-2.0.0_p481-SVNr40636-asm-ilp32.diff
Created attachment 378674 [details, diff] ruby-2.0.0_p481-SVNr39186-asm-volatile.diff
Note that attached patch are still needed for dev-lang/ruby-2.0.0_p598
These patches have now been applied to ruby 2.0.0_p647-r1.