Bug 753455

Summary: iwhd fails to link when compiled with --target i386
Product: [Fedora] Fedora Reporter: Jim Meyering <meyering>
Component: iwhdAssignee: Jim Meyering <meyering>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: clalancette, meyering, slinaber, zaitcev
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-14 14:02:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jim Meyering 2011-11-12 17:32:11 UTC
Description of problem:
[This is not a bug in iwhd.  I expect to close it NOTABUG or to reassign it. ]
Building for i386, you get a link failure:

...replica.c:445: undefined reference to `__sync_fetch_and_add_4'

The solution is not to build for i386, since it lacks the atomic
built-in functions.  Use -march=i486 or greater instead.

How reproducible: every time.

Steps to Reproduce:
1. build with arch of i386
2.
3.

Actual results:
link failure, as above

Expected results:
successful build

Additional info:
  It seems this is a FAQ:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43980

Comment 1 Jim Meyering 2011-11-14 14:02:52 UTC
For the record, this was fixed by telling the RPM-building tool
to build for the target i686, rather than i386.