Hello, On Tue, 9 Feb 2016 19:55:50 +0100, Max Kellermann wrote: > On 2016/02/07 22:11, Thomas Petazzoni <[email protected]> > wrote: > > The mpd source code uses the C++11 <atomic> functionality, which > > internally is implemented using the __atomic_*() gcc built-ins. On > > certain architectures, the __atomic_*() built-ins are implemented in > > the libatomic library that comes with the rest of the gcc runtime. Due > > to this, code using <atomic> might need to link against libatomic, > > otherwise one hits build issues such as: > > I would expect the C++ compiler to figure out the link-time > dependencies of its own standard library. Why isn't that happening on > SPARC? This looks like a toolchain bug, doesn't it?
No, it isn't, and a number of other projects also link against libatomic explicitly. See for example this patch to openvswitch: http://openvswitch.org/pipermail/dev/2013-December/034609.html See also the Android NDK reference documentation, which tells to link against libatomic when <atomic> is used: http://developer.android.com/ndk/guides/cpp-support.html Some relevant Stack Overflow posts: http://stackoverflow.com/questions/30591313/why-does-g-still-require-latomic http://stackoverflow.com/questions/31381892/fedora-22-compile-atomic-is-lock-free Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com _______________________________________________ mpd-devel mailing list [email protected] http://mailman.blarg.de/listinfo/mpd-devel
