package/libsodium: add config for full build
authorAdrien Gallouët <adrien@gallouet.fr>
Mon, 30 Sep 2019 15:34:16 +0000 (15:34 +0000)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 30 Sep 2019 21:31:45 +0000 (23:31 +0200)
A new option is added to build all functions.

This option was implicitly used before, so it is activated by default to
avoid unpleasant surprises.

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/libsodium/Config.in
package/libsodium/libsodium.mk

index 47b9bb350c0b6a5b296591e31b61d1c81d34e7e2..518b0532ed401e84005bfa151144a6149f65acb7 100644 (file)
@@ -4,3 +4,15 @@ config BR2_PACKAGE_LIBSODIUM
          A modern and easy-to-use crypto library.
 
          http://libsodium.org/
+
+if BR2_PACKAGE_LIBSODIUM
+
+config BR2_PACKAGE_LIBSODIUM_FULL
+       bool "all functions"
+       default y
+       help
+         Build all seldom used and obsolete functions. Without
+         this option, only the minimal set of normally used
+         functions is built.
+
+endif
index a94a8271c5fc9582248ecab650a752de96b3845e..a8e0f7914958f35ea2830cc14a49be9e4b683332 100644 (file)
@@ -14,5 +14,11 @@ ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
 LIBSODIUM_CONF_OPTS += --disable-pie
 endif
 
+ifeq ($(BR2_PACKAGE_LIBSODIUM_FULL),y)
+LIBSODIUM_CONF_OPTS += --disable-minimal
+else
+LIBSODIUM_CONF_OPTS += --enable-minimal
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))