Skip to contentSkip to conversation

package/libargon2: conditionally shared/static lib build

PATCH Superseded Andreas Mohr via buildroot 1 participant 1 message May 15

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/libargon2: conditionally shared/static lib build

libargon2 build shared and static lib by default.

Add conditionally BR2_SHARED_LIBS and BR2_STATIC_LIBS support.

---
Changes in v2:
- add conditionally shared lib build

---
 package/libargon2/Config.in    | 5 -----
 package/libargon2/libargon2.mk | 6 ++++++
 2 files changed, 6 insertions(+), 5 deletions(-)
package/libargon2/Config.in +0 -5
index 6bba74cfb2..73c1e0d777 100644
@@ -1,12 +1,7 @@
 config BR2_PACKAGE_LIBARGON2
 	bool "libargon2"
 	depends on BR2_USE_MMU
-	depends on !BR2_STATIC_LIBS
 	help
 	  A modern password hashing algorithm
 
 	  https://password-hashing.net/#argon2
-
-comment "libargon needs a toolchain w/ dynamic library"
-	depends on BR2_USE_MMU
-	depends on BR2_STATIC_LIBS
package/libargon2/libargon2.mk +6 -0
index b3f6e1b216..8ca0071a15 100644
@@ -23,6 +23,12 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
 LIBARGON2_OPTS += NO_THREADS=1
 endif
 
+ifeq ($(BR2_STATIC_LIBS),y)
+LIBARGON2_OPTS += LIB_SH= LINKED_LIB_SH=
+else ifeq ($(BR2_SHARED_LIBS),y)
+LIBARGON2_OPTS += LIB_ST=
+endif
+
 define LIBARGON2_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
 		$(LIBARGON2_OPTS)
Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot