Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] libkcapi: split BR2_PACKAGE_LIBKCAPI_APPS
@ 2018-05-06 20:06 Fabrice Fontaine
  2018-05-06 20:23 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2018-05-06 20:06 UTC (permalink / raw)
  To: buildroot

Since commit https://github.com/smuellerDD/libkcapi/commit/af313accf18887b4f6dbd7306c2389ddf271c9b7,
hasher test application depends on dlfcn.h. To avoid putting all apps
under !BR2_STATIC_LIBS dependency, split BR2_PACKAGE_LIBKCAPI_APPS into
several variables.

Moreover, BR2_USE_MMU is only a dependency of BR2_PACKAGE_LIBKCAPI_TEST
as other applications don't use fork.

Finally, enc or dgst applications could be enabled in a next patch if
needed.

Fixes:
 - http://autobuild.buildroot.net/results/7c57f3025030eff41a5cde52759821249859caf1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/libkcapi/Config.in   | 20 +++++++++++++++-----
 package/libkcapi/libkcapi.mk | 32 +++++++++++++++++++++-----------
 2 files changed, 36 insertions(+), 16 deletions(-)

diff --git a/package/libkcapi/Config.in b/package/libkcapi/Config.in
index 2b981777e6..7397cfe800 100644
--- a/package/libkcapi/Config.in
+++ b/package/libkcapi/Config.in
@@ -7,11 +7,21 @@ config BR2_PACKAGE_LIBKCAPI
 
 if BR2_PACKAGE_LIBKCAPI
 
-config BR2_PACKAGE_LIBKCAPI_APPS
-	bool "build test applications"
+config BR2_PACKAGE_LIBKCAPI_HASHER
+	bool "build hasher application"
+	depends on !BR2_STATIC_LIBS # dlfcn.h
+
+comment "hasher application needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
+
+config BR2_PACKAGE_LIBKCAPI_RNGAPP
+	bool "build rng read application"
+
+config BR2_PACKAGE_LIBKCAPI_SPEED
+	bool "build speed-test program"
+
+config BR2_PACKAGE_LIBKCAPI_TEST
+	bool "build test program"
 	depends on BR2_USE_MMU # fork()
-	help
-	  Build additional test applications that can provide
-	  performance or algorithm tests.
 
 endif
diff --git a/package/libkcapi/libkcapi.mk b/package/libkcapi/libkcapi.mk
index 44469017df..1a45f4f996 100644
--- a/package/libkcapi/libkcapi.mk
+++ b/package/libkcapi/libkcapi.mk
@@ -12,18 +12,28 @@ LIBKCAPI_INSTALL_STAGING = YES
 LIBKCAPI_LICENSE = BSD-3-Clause (library), BSD-3-Clause or GPL-2.0 (programs)
 LIBKCAPI_LICENSE_FILES = COPYING COPYING.gplv2 COPYING.bsd
 
-ifeq ($(BR2_PACKAGE_LIBKCAPI_APPS),y)
-LIBKCAPI_CONF_OPTS += \
-	--enable-kcapi-speed \
-	--enable-kcapi-test \
-	--enable-kcapi-hasher \
-	--enable-kcapi-rngapp
+ifeq ($(BR2_PACKAGE_LIBKCAPI_HASHER),y)
+LIBKCAPI_CONF_OPTS += --enable-kcapi-hasher
 else
-LIBKCAPI_CONF_OPTS += \
-	--disable-kcapi-speed \
-	--disable-kcapi-test \
-	--disable-kcapi-hasher \
-	--disable-kcapi-rngapp
+LIBKCAPI_CONF_OPTS += --disable-kcapi-hasher
+endif
+
+ifeq ($(BR2_PACKAGE_LIBKCAPI_RNGAPP),y)
+LIBKCAPI_CONF_OPTS += --enable-kcapi-rngapp
+else
+LIBKCAPI_CONF_OPTS += --disable-kcapi-rngapp
+endif
+
+ifeq ($(BR2_PACKAGE_LIBKCAPI_SPEED),y)
+LIBKCAPI_CONF_OPTS += --enable-kcapi-speed
+else
+LIBKCAPI_CONF_OPTS += --disable-kcapi-speed
+endif
+
+ifeq ($(BR2_PACKAGE_LIBKCAPI_TEST),y)
+LIBKCAPI_CONF_OPTS += --enable-kcapi-test
+else
+LIBKCAPI_CONF_OPTS += --disable-kcapi-test
 endif
 
 $(eval $(autotools-package))
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH 1/1] libkcapi: split BR2_PACKAGE_LIBKCAPI_APPS
  2018-05-06 20:06 [Buildroot] [PATCH 1/1] libkcapi: split BR2_PACKAGE_LIBKCAPI_APPS Fabrice Fontaine
@ 2018-05-06 20:23 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-05-06 20:23 UTC (permalink / raw)
  To: buildroot

Hello Fabrice,

On Sun,  6 May 2018 22:06:08 +0200, Fabrice Fontaine wrote:

> -config BR2_PACKAGE_LIBKCAPI_APPS
> -	bool "build test applications"

Since you're removing a Config.in option, you need to add proper
handling in Config.in.legacy.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-06 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-06 20:06 [Buildroot] [PATCH 1/1] libkcapi: split BR2_PACKAGE_LIBKCAPI_APPS Fabrice Fontaine
2018-05-06 20:23 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox