Re: [PATCH 3/1] build: work with glibc that lacks CPU_COUNT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/21/2012 12:39 PM, Daniel P. Berrange wrote:
> On Tue, Aug 21, 2012 at 11:17:21AM -0600, Eric Blake wrote:
>> Building on RHEL 5 warned:
>>
>> nodeinfo.c: 305: warning: implicit declaration of function 'CPU_COUNT'
>>
>> This extension macro in <sched.h> was not added until later glibc.
>>
>> * src/nodeinfo.c (CPU_COUNT): Add fallback implementation.
>> ---
>>
>> Pushing under the build-breaker rule.  I'm still getting link
>> failures:
>>
>> ./.libs/libvirt_util.a(libvirt_util_la-virobject.o): In function `virAtomicIntXor':
>> /home/dummy/l,ibvirt/src/util/viratomoic.h:404: multiple definition of `virAtomicIntXor'
>> ./.libs/libvirt_util.a(libvirt_util_la-viratomic.o):/home/dummy/libvirt/src/util/viratomic.h:404: first defined here
> 
> Hmm, that seems to suggested that when viratomic.c #includes
> viratomic.h, GCC is instantiating the functions, even though
> they're declared inline.

Yep, we declared them 'inline' (which means they still have an eternal
address), not 'static inline' (which means don't emit, if possible) or
even '__attribute__((__gnu_inline__))' (which means don't emit, ever).
We don't see it on modern Fedora or RHEL (gcc intrinsics work); I'm not
sure why mingw isn't seeing it, but RHEL 5 is seeing it because it falls
back to the pthread implementation.  I'm testing a patch now...

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]