| Message ID | 20261118145502.3243739-4-khem.raj@oss.qualcomm.com |
|---|---|
| State | New |
| Headers | show |
| Series | [1/5] libtasn1: Enable linker version script explicitly | expand |
diff --git a/meta/recipes-support/gnutls/gnutls_3.8.13.bb b/meta/recipes-support/gnutls/gnutls_3.8.13.bb index 88b6135bf1..706663c985 100644 --- a/meta/recipes-support/gnutls/gnutls_3.8.13.bb +++ b/meta/recipes-support/gnutls/gnutls_3.8.13.bb @@ -57,6 +57,8 @@ EXTRA_OECONF = " \ --with-default-trust-store-file=${sysconfdir}/ssl/certs/ca-certificates.crt \ " +LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}" + # Otherwise the tools try and use HOSTTOOLS_DIR/bash as a shell. export POSIX_SHELL = "${base_bindir}/sh"
configure's linker version script check links an empty program with a script that assigns versions to an undefined symbol 'sym'. lld defaults to --no-undefined-version and rejects it, so with ld-is-lld libgnutls was built without any symbol versions. Consumers linked earlier against the versioned library then fail file-rdeps QA, e.g. openldap: libldap.so.2 requires libgnutls.so.30(GNUTLS_3_4)(64bit), but no providers found in RDEPENDS:openldap? [file-rdeps] libgnutls.map is static and also lists symbols that only exist with optional features, e.g. the gnutls_pkcs11_* API without p11-kit, so lld fails the library link once version scripts are used. Pass --undefined-version as GNU ld behaves, which fixes both the configure probe and the link, and restores the GNUTLS_* symbol versions. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- meta/recipes-support/gnutls/gnutls_3.8.13.bb | 2 ++ 1 file changed, 2 insertions(+)