diff mbox series

[6/7] binutils-cross-canadian: Always use GNU linker

Message ID 20250801042242.3076232-6-raj.khem@gmail.com
State New
Headers show
Series [1/7] toolchain/clang-native: Set BUILD_LDFLAGS instead of LDFLAGS | expand

Commit Message

Khem Raj Aug. 1, 2025, 4:22 a.m. UTC
LLD fails to link gprofng
aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'dlclose' failed: symbol not defined
aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'dlopen' failed: symbol not defined
aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'fclose' failed: symbol not defined
aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'fdopen' failed: symbol not defined
aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'fgetpos' failed: symbol not defined
aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'fopen' failed: symbol not defined
aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'fsetpos' failed: symbol not defined

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/binutils/binutils-cross-canadian.inc | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
index c1fda1a4658..7d7ffe92ce1 100644
--- a/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross-canadian.inc
@@ -13,6 +13,11 @@  EXTRA_OECONF += "--with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VEND
 # e.g. we switch between different machines with different tunes.
 EXTRA_OECONF[vardepsexclude] = "TUNE_PKGARCH"
 
+# lld complains
+# aarch64-yoesdk-linux-ld.lld: error: version script assignment of 'GLIBC_2.0' to symbol 'dlclose' failed: symbol not defined
+
+LDFLAGS:append:toolchain-clang = " -fuse-ld=bfd"
+
 do_install () {
 	autotools_do_install