* [Buildroot] [PATCH v2, 1/1] package/log4cplus: link with libatomic when needed
@ 2019-02-17 9:33 Fabrice Fontaine
2019-02-17 15:01 ` Thomas Petazzoni
2019-02-22 12:03 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2019-02-17 9:33 UTC (permalink / raw)
To: buildroot
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
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
- Fix patch so that it applies on current master
package/log4cplus/log4cplus.mk | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/package/log4cplus/log4cplus.mk b/package/log4cplus/log4cplus.mk
index 22efde2fd6..0bc4fc9aa6 100644
--- a/package/log4cplus/log4cplus.mk
+++ b/package/log4cplus/log4cplus.mk
@@ -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))
--
2.14.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2, 1/1] package/log4cplus: link with libatomic when needed
2019-02-17 9:33 [Buildroot] [PATCH v2, 1/1] package/log4cplus: link with libatomic when needed Fabrice Fontaine
@ 2019-02-17 15:01 ` Thomas Petazzoni
2019-02-22 12:03 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-02-17 15:01 UTC (permalink / raw)
To: buildroot
Hello,
On Sun, 17 Feb 2019 10:33:26 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> 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
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> 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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2, 1/1] package/log4cplus: link with libatomic when needed
2019-02-17 9:33 [Buildroot] [PATCH v2, 1/1] package/log4cplus: link with libatomic when needed Fabrice Fontaine
2019-02-17 15:01 ` Thomas Petazzoni
@ 2019-02-22 12:03 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2019-02-22 12:03 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> 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.
> Fixes:
> - http://autobuild.buildroot.org/results/16e360cb91afff7655f459a3d1fb906ca48f8464
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2:
> - Fix patch so that it applies on current master
Committed to 2018.11.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-22 12:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-17 9:33 [Buildroot] [PATCH v2, 1/1] package/log4cplus: link with libatomic when needed Fabrice Fontaine
2019-02-17 15:01 ` Thomas Petazzoni
2019-02-22 12:03 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.