aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2019-02-15 22:05:59 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-02-24 22:02:32 +0100
commitf88bf61b2934c00aeff12346c2d7dc45b9ab9cda (patch)
treec12592dd359a59ec75d80534ab8219228a1379eb /package
parentdd6e3c8f1acae4b366803039e9f266f58ca7461e (diff)
downloadbuildroot-f88bf61b2934c00aeff12346c2d7dc45b9ab9cda.tar.gz
buildroot-f88bf61b2934c00aeff12346c2d7dc45b9ab9cda.tar.bz2
package/i2pd: 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/515160349b11f06a090f3e13992e30da9a402c17 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package')
-rw-r--r--package/i2pd/i2pd.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/i2pd/i2pd.mk b/package/i2pd/i2pd.mk
index a92d513159..3ce5f97fb8 100644
--- a/package/i2pd/i2pd.mk
+++ b/package/i2pd/i2pd.mk
@@ -21,6 +21,10 @@ I2PD_CONF_OPTS += -DWITH_GUI=OFF
# build failure when cross-compiling.
I2PD_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+I2PD_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
+endif
+
ifeq ($(BR2_STATIC_LIBS),y)
I2PD_CONF_OPTS += -DWITH_STATIC=ON
else