From be5856616aee1d2134e6aedefc5fe664ad5e2a7d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 11 Aug 2025 22:13:11 -0700 Subject: [PATCH] zlib: Always use GNU ld for linking Linking does not yet work with LLD Fixes aarch64-yoesdk-linux-ld.lld: error: undefined symbol: gzopen >>> referenced by minigzip.c >>> minigzip.o:(main) Signed-off-by: Khem Raj Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- meta/recipes-core/zlib/zlib_1.3.1.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/recipes-core/zlib/zlib_1.3.1.bb b/meta/recipes-core/zlib/zlib_1.3.1.bb index e62c50c5df7..a313e5aed10 100644 --- a/meta/recipes-core/zlib/zlib_1.3.1.bb +++ b/meta/recipes-core/zlib/zlib_1.3.1.bb @@ -20,6 +20,9 @@ SRC_URI[sha256sum] = "9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b PREMIRRORS:append = " https://zlib.net/ https://zlib.net/fossils/" CFLAGS += "-D_REENTRANT -fPIE" +# zlib does not build with lld, keep it until https://github.com/madler/zlib/pull/936 +# is addressed +LDFLAGS:append = " -fuse-ld=bfd" RDEPENDS:${PN}-ptest += "make" -- 2.47.3