Bug 733162 - icu-4.4.1-3.fc14 fails to build on ARM due to gcc bug
icu-4.4.1-3.fc14 fails to build on ARM due to gcc bug
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: icu (Show other bugs)
14
arm7 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Caolan McNamara
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ARMTracker
  Show dependency treegraph
 
Reported: 2011-08-24 19:02 EDT by Daniel Drake
Modified: 2011-08-25 11:13 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-08-25 07:33:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
test case with instructions inside (502 bytes, text/plain)
2011-08-24 19:02 EDT, Daniel Drake
no flags Details
icu workaround to avoid using GCC atomic builtins on ARM (650 bytes, text/plain)
2011-08-24 19:10 EDT, Daniel Drake
no flags Details

  None (edit)
Description Daniel Drake 2011-08-24 19:02:30 EDT
Created attachment 519738 [details]
test case with instructions inside

icu fails to build for ARM on f14:

/usr/bin/ld: ../../make[2]: Leaving directory `/builddir/build/BUILD/icu/source/tools/makeconv'
bin/makeconv: hidden symbol `__sync_val_compare_and_swap_4' in /usr/lib/gcc/armv5tel-redhat-linux-gnueabi/4.5.1/libgcc.a(linux-atomic.o) is referenced by DSO
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

This is somehow related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40134
however, the patches mentioned there are shipped in F14 gcc. hmm.

I narrowed this down to a small test case, which I will attach. To summarise, when using GCC's inbuilt atomic functions in a DSO linked with g++, the atomic function code doesn't get copied from libgcc.a into the output DSO like it should. If linking with gcc instead of g++, it works fine.

The test case is already confirmed to work on F15, so even though this is a gcc bug, I think it would be acceptable to work around this in F14 within the icu package, and dedicate our time to moving to F15+ ASAP.

I'm attaching my proposed workaround. Also, an already-upstream patch is needed from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589076

then it builds OK :)
Comment 1 Daniel Drake 2011-08-24 19:10:33 EDT
Created attachment 519741 [details]
icu workaround to avoid using GCC atomic builtins on ARM
Comment 2 Caolan McNamara 2011-08-25 04:54:31 EDT
Checked in both fixes to F14, and the asm one for F15. F16 onwards should have the asm fix already.

That sufficient, or anything else needed ?
Comment 3 Peter Robinson 2011-08-25 11:13:12 EDT
> That sufficient, or anything else needed ?

Absolutely perfect! Thanks for the fixes to all branches and the very quick response :)

Note You need to log in before you can comment on or make changes to this bug.