package/log4cplus: link with libatomic when needed
PATCH v2 1/1 package/log4cplus: link with libatomic when needed
On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:
sparc-buildroot-linux-uclibc/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line
This is often for example the case on sparcv8 32 bit.
Fixes:
- http://autobuild.buildroot.org/results/16e360cb91afff7655f459a3d1fb906ca48f8464
---
Changes v1 -> v2:
- Fix patch so that it applies on current master
package/log4cplus/log4cplus.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/log4cplus/log4cplus.mk +4 -0
@@ -11,4 +11,8 @@ LOG4CPLUS_LICENSE = Apache-2.0, BSD-2-Clause, BSD-like (threadpool) LOG4CPLUS_LICENSE_FILES = LICENSE LOG4CPLUS_INSTALL_STAGING = YES +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +LOG4CPLUS_CONF_ENV += LIBS='-latomic' +endif + $(eval $(autotools-package))
Signature · 1 line
2.14.1
Thomas Petazzoni
AppliedPATCH v2 1/1 package/log4cplus: link with libatomic when needed
Hello,
Quoted 8 lines · On Sun, 17 Feb 2019 10:33:26 +0100 Fabrice Fontaine…
On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:
sparc-buildroot-linux-uclibc/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line
This is often for example the case on sparcv8 32 bit.
Quoted 7 lines
Fixes:
- http://autobuild.buildroot.org/results/16e360cb91afff7655f459a3d1fb906ca48f8464Signed-off-by Fabrice Fontaine <[email protected]>---
Changes v1 -> v2:
- Fix patch so that it applies on current master
Applied to master, thanks. However, as usual, I would prefer an upstreamable solution that relies on changing the CMakeLists.txt so that it checks if linking against libatomic is needed.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/1 package/log4cplus: link with libatomic when needed
In reply to Fabrice FontaineQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
On some architectures, atomic binutils are provided by the libatomic library from gcc. Linking with libatomic is therefore necessary, otherwise the build fails with:
sparc-buildroot-linux-uclibc/sysroot/lib/libatomic.so.1: error adding symbols: DSO missing from command line
This is often for example the case on sparcv8 32 bit.
Quoted 7 lines
Fixes:
- http://autobuild.buildroot.org/results/16e360cb91afff7655f459a3d1fb906ca48f8464Signed-off-by Fabrice Fontaine <[email protected]>---
Changes v1 -> v2:
- Fix patch so that it applies on current master
Committed to 2018.11.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard