diff mbox series

[5/5] tiff: Pass --undefined-version to lld

Message ID 20261118145502.3243739-5-khem.raj@oss.qualcomm.com
State New
Headers show
Series [1/5] libtasn1: Enable linker version script explicitly | expand

Commit Message

Khem Raj Nov. 18, 2026, 2:55 p.m. UTC
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 libtiff was
built without the LIBTIFF_4.* symbol versions, silently changing its
ABI.

libtiff.map is shared by all platforms and lists the Windows-only
TIFFOpenW and TIFFOpenWExt, so lld also 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.

AI-Generated: Uses Claude Code
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta/recipes-multimedia/libtiff/tiff_4.7.2.bb | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/libtiff/tiff_4.7.2.bb b/meta/recipes-multimedia/libtiff/tiff_4.7.2.bb
index 8bc3a48657..1f6245f02d 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.7.2.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.7.2.bb
@@ -25,6 +25,8 @@  CVE_STATUS[CVE-2026-4775] = "fixed-version: Fixed since 4.7.2, NVD tracks this a
 
 inherit autotools multilib_header
 
+LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' -Wl,--undefined-version', '', d)}"
+
 CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
 
 PACKAGECONFIG ?= "cxx jpeg zlib lzma \