diff mbox series

[meta-oe,05/13] libkcapi: Fix build with lld

Message ID 20261114193733.1743149-5-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,01/13] frame: Fix build with lld without x11 | expand

Commit Message

Khem Raj Nov. 14, 2026, 7:37 p.m. UTC
The version script lists all APIs, including the asymmetric cipher and
KPP ones that are only built with --enable-lib-asym/--enable-lib-kpp, so
lld fails with:

  error: version script assignment of 'LIBKCAPI_0.12.0' to symbol 'kcapi_akcipher_init' failed: symbol not defined

Upstream prefers to keep a single version script for all configurations
[1], so allow undefined versioned symbols with lld.

[1] https://github.com/smuellerDD/libkcapi/issues/191

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.1.bb | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.1.bb b/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.1.bb
index c4f5010058..c9983f3bd8 100644
--- a/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.1.bb
+++ b/meta-oe/recipes-crypto/libkcapi/libkcapi_1.5.1.bb
@@ -11,6 +11,9 @@  inherit autotools
 
 CACHED_CONFIGUREVARS += "ac_cv_prog_cc_c23=no"
 
+# The version script lists the APIs that can be disabled at configure time
+LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}"
+
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[testapp] = "--enable-kcapi-test,,,bash"
 PACKAGECONFIG[apps] = "--enable-kcapi-speed --enable-kcapi-hasher --enable-kcapi-rngapp --enable-kcapi-encapp --enable-kcapi-dgstapp,,,"