Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480238 - dev-lang/ruby-2.0.0_p598 on x32 - gc.c:2281 Error: operand type mismatch for `movq'
Summary: dev-lang/ruby-2.0.0_p598 on x32 - gc.c:2281 Error: operand type mismatch for ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: x32
  Show dependency tree
 
Reported: 2013-08-08 09:53 UTC by Bertrand Jacquin
Modified: 2015-09-13 06:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,27.96 KB, text/x-log)
2013-08-08 09:53 UTC, Bertrand Jacquin
Details
emerge --info (info.log,15.32 KB, text/x-log)
2013-08-08 09:53 UTC, Bertrand Jacquin
Details
ruby-2.0.0_p247-SVNr39186-asm-volatile.diff (ruby-2.0.0_p247-SVNr39186-asm-volatile.diff,1.21 KB, patch)
2013-08-09 12:39 UTC, Bertrand Jacquin
Details | Diff
ruby-2.0.0_p247-SVNr40636-asm-ilp32.diff (ruby-2.0.0_p247-SVNr40636-asm-ilp32.diff,617 bytes, patch)
2013-08-09 12:39 UTC, Bertrand Jacquin
Details | Diff
ruby-2.0.0_p481-SVNr40636-asm-ilp32.diff (ruby-2.0.0_p481-SVNr40636-asm-ilp32.diff,617 bytes, patch)
2014-06-11 08:34 UTC, Bertrand Jacquin
Details | Diff
ruby-2.0.0_p481-SVNr39186-asm-volatile.diff (ruby-2.0.0_p481-SVNr39186-asm-volatile.diff,793 bytes, patch)
2014-06-11 08:35 UTC, Bertrand Jacquin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Jacquin 2013-08-08 09:53:06 UTC
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
Comment 1 Bertrand Jacquin 2013-08-08 09:53:30 UTC
Created attachment 355392 [details]
build.log
Comment 2 Bertrand Jacquin 2013-08-08 09:53:42 UTC
Created attachment 355394 [details]
emerge --info
Comment 3 Bertrand Jacquin 2013-08-09 12:36:15 UTC
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
Comment 4 Bertrand Jacquin 2013-08-09 12:39:08 UTC
Created attachment 355480 [details, diff]
ruby-2.0.0_p247-SVNr39186-asm-volatile.diff

$ svn diff -c 39186 gc.h
Comment 5 Bertrand Jacquin 2013-08-09 12:39:26 UTC
Created attachment 355482 [details, diff]
ruby-2.0.0_p247-SVNr40636-asm-ilp32.diff

svn diff -c 40636 gc.h
Comment 6 Manuel Rüger (RETIRED) gentoo-dev 2014-06-11 04:00:24 UTC
Can you please test again with dev-lang/ruby-2.0.0_p353 and p481?
Comment 7 Bertrand Jacquin 2014-06-11 08:33:47 UTC
(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.
Comment 8 Bertrand Jacquin 2014-06-11 08:34:48 UTC
Created attachment 378672 [details, diff]
ruby-2.0.0_p481-SVNr40636-asm-ilp32.diff
Comment 9 Bertrand Jacquin 2014-06-11 08:35:06 UTC
Created attachment 378674 [details, diff]
ruby-2.0.0_p481-SVNr39186-asm-volatile.diff
Comment 10 Bertrand Jacquin 2015-02-04 22:26:18 UTC
Note that attached patch are still needed for dev-lang/ruby-2.0.0_p598
Comment 11 Hans de Graaff gentoo-dev Security 2015-09-13 06:57:35 UTC
These patches have now been applied to ruby 2.0.0_p647-r1.