Bug 889914

Summary: libatomic_ops needs a small type change ( invalid conversion from 'int' to 'AO_BYTE_TS_val' )
Product: [Fedora] Fedora Reporter: Bryce <root>
Component: gcAssignee: Rex Dieter <rdieter>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 18CC: dan, extras-orphan, paulo.cesar.pereira.de.andrade, praiskup, rdieter, sochotni
Target Milestone: ---   
Target Release: ---   
Hardware: sparc   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-24 13:11:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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
=--=