Bug 467658 - additional atomic support check in configure for sh (Super-H) arch
additional atomic support check in configure for sh (Super-H) arch
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: cairo (Show other bugs)
rawhide
sh4 Linux
medium Severity low
: ---
: ---
Assigned To: Behdad Esfahbod
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-19 22:41 EDT by CHIKAMA Masaki
Modified: 2008-10-20 21:36 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-20 12:57:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
cairo-1.8.0-checkcmpxchg.patch (385 bytes, patch)
2008-10-19 22:41 EDT, CHIKAMA Masaki
no flags Details | Diff

  None (edit)
Description CHIKAMA Masaki 2008-10-19 22:41:46 EDT
Created attachment 320835 [details]
cairo-1.8.0-checkcmpxchg.patch

Description of problem:
 The cairo uses native atomic operation (__sync_fetch_and_add and __sync_val_compare_and_swap)
defined in cairo-atomic-private.h, and checks whether a system has them in configure script.
But in fact, configure script checks only __sync_fetch_and_add and this causes undefined 
symbol on sh architecture link below.

/usr/lib/gcc/sh4-redhat-linux/4.3.0/../../../libcairo.so: undefined reference to
 `__sync_val_compare_and_swap_4'
collect2: ld returned 1 exit status

This is a proposed patch for configure script to check both function.

--- cairo-1.8.0/configure.org   2008-10-19 19:27:20.000000000 +0900
+++ cairo-1.8.0/configure       2008-10-19 20:29:50.000000000 +0900
@@ -22857,6 +22857,7 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }
+int atomic_int_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap(&i, j, k); }
 int
 main ()
 {


Version-Release number of selected component (if applicable):
 cairo-1.8.0-1.fc10
Comment 1 Matthias Clasen 2008-10-20 12:57:24 EDT
This should probably be reported upstream.
Fedora doesn't support that architecture...
Comment 2 CHIKAMA Masaki 2008-10-20 21:13:12 EDT
So..., could you contact upstream and push the patch please ?
Comment 3 Matthias Clasen 2008-10-20 21:36:48 EDT
Please send it yourself to cairo@cairographics.org.

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