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

Bug 610104

Summary: sys-apps/memtest86+-5.01-r2 inline asm fails due to -fPIC
Product: Gentoo Linux Reporter: Michael K. Plante <michael.plante>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch to save/load ebx in affected blocks
emerge --info

Description Michael K. Plante 2017-02-20 17:29:59 UTC
Created attachment 464450 [details, diff]
patch to save/load ebx in affected blocks

This exact version of the package compiled successfully a few months ago, though I may have been building it off a stage3 on a new computer prior to installing gcc (current gcc installed is 4.9.4, binutils is 2.25.1-r1), as it no longer compiles on that computer, nor has it ever compiled on my others.  I realize it is ~amd64, but I needed it for some reason that I don't recall.

Errors such as the following occur on attempt to emerge:

test.c: In function ‘movinvr’:
test.c:371:25: error: inconsistent operand constraints in an ‘asm’
                         asm __volatile__ (
                         ^
test.c:435:5: error: inconsistent operand constraints in an ‘asm’
     asm __volatile__ (
     ^

It turns out there are many other such errors in test.c, but they don't show up until you fix these.  The attached patch should (I think) fix this.  I diff-ed the assembly against a non-fPIC compilation without the patch and it looks correct, though I'd appreciate someone checking it.

Use flags are -floppy, -serial.
Comment 1 Michael K. Plante 2017-02-20 17:31:06 UTC
Created attachment 464452 [details]
emerge --info
Comment 2 Michael Palimaka (kensington) gentoo-dev 2017-02-22 09:05:17 UTC

*** This bug has been marked as a duplicate of bug 538596 ***