package/i2pd: fix static build with atomic
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Fri, 27 Dec 2019 13:13:32 +0000 (14:13 +0100)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sun, 29 Dec 2019 09:59:23 +0000 (10:59 +0100)
Use HAVE_CXX_ATOMICS_WITHOUT_LIB and HAVE_CXX_ATOMICS64_WITHOUT_LIB
variables to tell i2pd to check for atomic library and add it in
$(REQUIRED_LIBRARIES) if needed

Fixes:
 - http://autobuild.buildroot.org/results/dfffe21fab65b3fc81f449004a6771fd00efbc57

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/i2pd/i2pd.mk

index de975d66a4c77a234477ef2bcf4d12806b751431..a064057f1f3961787463219716fd37a7188b21ef 100644 (file)
@@ -22,7 +22,9 @@ I2PD_CONF_OPTS += -DWITH_GUI=OFF
 I2PD_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF
 
 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
-I2PD_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
+I2PD_CONF_OPTS += \
+       -DHAVE_CXX_ATOMICS_WITHOUT_LIB=OFF \
+       -DHAVE_CXX_ATOMICS64_WITHOUT_LIB=OFF
 endif
 
 ifeq ($(BR2_STATIC_LIBS),y)