Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 466860

Summary: dev-libs/libatomic_ops-7.2d - atomic_ops/sysdeps/gcc/x86.h:149:5: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
Product: Gentoo Linux Reporter: Luke-Jr <luke-jr+gentoobugs>
Component: Current packagesAssignee: Gentoo Sound Team <sound>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: myckel
Priority: Normal    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
emerge --info

Description Luke-Jr 2013-04-23 01:00:08 UTC
Created attachment 346344 [details]
build log

atomic_ops/sysdeps/gcc/x86.h: In function ‘AO_compare_double_and_swap_double_full’:
atomic_ops/sysdeps/gcc/x86.h:149:5: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
atomic_ops/sysdeps/gcc/x86.h:149:5: error: ‘asm’ operand has impossible constraints
Comment 1 Luke-Jr 2013-04-23 01:00:27 UTC
Created attachment 346346 [details]
emerge --info
Comment 2 Rafał Mużyło 2013-04-23 04:52:26 UTC
CBUILD="i686-pc-linux-gnu"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -pipe -ggdb -O0 -mavx -fauto-inc-dec -fdce -fdse -fguess-branch-probability -fipa-pure-const -fmerge-constants -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-sra -fthread-jumps -fcaller-saves -finline-small-functions -findirect-inlining -foptimize-sibling-calls -fregmove -fstrict-aliasing -fstrict-overflow "

Something about this combination doesn't make sense, actually, it's more than one thing.

As you might know, on x86 there's very few general use registers...
Comment 3 Luke-Jr 2013-04-23 06:18:25 UTC
(In reply to comment #2)
> CBUILD="i686-pc-linux-gnu"
> CHOST="i686-pc-linux-gnu"
> CFLAGS="-march=core2 -pipe -ggdb -O0 -mavx -fauto-inc-dec -fdce -fdse
> -fguess-branch-probability -fipa-pure-const -fmerge-constants
> -ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copyrename -ftree-dce
> -ftree-dominator-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-sra
> -fthread-jumps -fcaller-saves -finline-small-functions -findirect-inlining
> -foptimize-sibling-calls -fregmove -fstrict-aliasing -fstrict-overflow "
> 
> Something about this combination doesn't make sense, actually, it's more
> than one thing.
> 
> As you might know, on x86 there's very few general use registers...

Can you elaborate? I hand-picked optimizations from -O2 which didn't interfere with gdb.
Comment 4 Luke-Jr 2013-04-23 18:45:39 UTC
Same problem occurs with CFLAGS="-ggdb -O0 -march=i686"
Comment 5 Luke-Jr 2013-04-28 03:31:00 UTC
Workaround: Add -fomit-frame-pointer to CFLAGS
Comment 6 Rafał Mużyło 2013-04-28 15:11:27 UTC
(In reply to comment #5)
> Workaround: Add -fomit-frame-pointer to CFLAGS

...and that (IIRC) effectively guts '-ggdb' on x86 (well, at least diminishes its effect).
Comment 7 Luke-Jr 2013-04-28 18:56:14 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Workaround: Add -fomit-frame-pointer to CFLAGS
> 
> ...and that (IIRC) effectively guts '-ggdb' on x86 (well, at least
> diminishes its effect).

Yep, but as far as I can see it's the only way to actually compile it on x86 :(
Comment 8 Myckel Habets 2013-10-23 05:33:00 UTC
Just got hit by this, confirming the bug. Workaround works as well.
Comment 9 Matt Turner gentoo-dev 2018-03-27 23:57:24 UTC
Can you reproduce this with the current stable version, 7.6.0?