Red Hat Bugzilla – Bug 733162
icu-4.4.1-3.fc14 fails to build on ARM due to gcc bug
Last modified: 2011-08-25 11:13:12 EDT
Created attachment 519738 [details]
test case with instructions inside
icu fails to build for ARM on f14:
/usr/bin/ld: ../../make: 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 :)
Created attachment 519741 [details]
icu workaround to avoid using GCC atomic builtins on ARM
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 ?
> That sufficient, or anything else needed ?
Absolutely perfect! Thanks for the fixes to all branches and the very quick response :)