]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
bluez: Fix linking with lld linker
authorKhem Raj <raj.khem@gmail.com>
Mon, 13 Apr 2026 06:43:09 +0000 (23:43 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 16 Apr 2026 10:09:38 +0000 (11:09 +0100)
Recent upgrades have been breaking with LLD as linker

aarch64-yoe-linux-ld.lld: error: undefined symbol: __stop___debug
>>> referenced by log.c:0 (/usr/src/debug/bluez5/5.86/../sources/bluez-5.86/src/log.c:0)
>>>               src/log.o:(__btd_log_init)
>>> referenced by log.c:0 (/usr/src/debug/bluez5/5.86/../sources/bluez-5.86/src/log.c:0)
>>>               src/log.o:(__btd_log_init)

This is described in LLD docs as well [1]

[1] https://lld.llvm.org/ELF/start-stop-gc

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-connectivity/bluez5/bluez5_5.86.bb

index 7f9972f59e0d939475b099a02b2f22c78d4e277a..2d56fc642dee9bd2ad8a7086ca9e5adf6508ffe7 100644 (file)
@@ -1,5 +1,7 @@
 require bluez5.inc
 
+LDFLAGS += " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', '-Wl,-z,nostart-stop-gc', '', d)}"
+
 SRC_URI[sha256sum] = "99f144540c6070591e4c53bcb977eb42664c62b7b36cb35a29cf72ded339621d"
 
 CVE_STATUS[CVE-2020-24490] = "cpe-incorrect: This issue has kernel fixes rather than bluez fixes"