Bug 889914 - libatomic_ops needs a small type change ( invalid conversion from 'int' to 'AO_BYTE_TS_val' )
Summary: libatomic_ops needs a small type change ( invalid conversion from 'int' to 'A...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: gc
Version: 18
Hardware: sparc
OS: All
unspecified
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-24 02:18 UTC by Bryce
Modified: 2012-12-24 13:11 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-12-24 13:11:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Bryce 2012-12-24 02:18:39 UTC
-sigh-
Someone has got to stop this 'everything we can stuff into it' mentality 8/

Fedora's php builds using firebird
firebird builds using libatomic_ops (old packages I know)

Anyway,..
DEBUG: /usr/include/atomic_ops/sysdeps/gcc/sparc.h: In function 'AO_BYTE_TS_val AO_test_and_set_full(volatile unsigned char*)':
DEBUG: /usr/include/atomic_ops/sysdeps/gcc/sparc.h:37: error: invalid conversion from 'int' to 'AO_BYTE_TS_val'

The 'fix' here is to simply swap out 'int' for AO_BYTE_TS_val (literally a one liner against the libatomic_ops-1.2-8.gc.fc12.src.rpm package

diff -up libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h.orig gc-7.1/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h
--- libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h.orig   2012-12-23 20:42:40.396855329 -0500
+++ libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc/sparc.h        2012-12-23 20:44:14.070853341 -0500
@@ -29,7 +29,7 @@

 AO_INLINE AO_TS_VAL_t
 AO_test_and_set_full(volatile AO_TS_t *addr) {
-  int oldval;
+  AO_TS_VAL_t oldval;

    __asm__ __volatile__("ldstub %1,%0"
                        : "=r"(oldval), "=m"(*addr)


Phil
=--=

Comment 1 Dan Horák 2012-12-24 11:34:54 UTC
libatomic_ops is provided by the "gc" package, switching ...

Phil, has the fix been already applied to upstream gc/libatomic_ops tree?

Comment 2 Bryce 2012-12-24 13:08:27 UTC
Argh, I missed that it had moved packagenames 8/ (koji can be a little too convenient to type in missing requires names sometimes 8/)

I checked the gc package and it indeed has the one line change
-sigh- sorry for the confusion on my part 8(



AO_INLINE AO_TS_VAL_t
AO_test_and_set_full(volatile AO_TS_t *addr) {
   AO_TS_VAL_t oldval;

   __asm__ __volatile__("ldstub %1,%0"
                        : "=r"(oldval), "=m"(*addr)
                        : "m"(*addr) : "memory");
   return oldval;
}
..


Sorry for the alarm

Phil
=--=


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