[Buildroot] [PATCH v3] package/llvm-project/lld: fix broken symlink in SDK
Victor Krawiec
victor.krawiec at arturia.com
Mon Sep 1 08:22:10 UTC 2025
The symlink bin/lld -> $(GNU_TARGET_NAME)/bin/lld is broken inside a SDK containing host-lld package
The symlink still points to the location of lld inside the build's host folder instead of the location of lld inside the SDK
In consequence GCC is not able to find lld linker
Changing the symlink to be relative during host-lld installation fixes the problem
Signed-off-by: Victor Krawiec <victor.krawiec at arturia.com>
---
Changes v2 -> v3:
- Change commit Author to match SoB line
Changes v1 -> v2:
- Change SoB line to use full name
Signed-off-by: Victor Krawiec <victor.krawiec at arturia.com>
---
package/llvm-project/lld/lld.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/llvm-project/lld/lld.mk b/package/llvm-project/lld/lld.mk
index c9a2d3796b..e7233e74ae 100644
--- a/package/llvm-project/lld/lld.mk
+++ b/package/llvm-project/lld/lld.mk
@@ -20,8 +20,8 @@ HOST_LLD_CONF_OPTS += -DLLVM_COMMON_CMAKE_UTILS=$(HOST_DIR)/lib/cmake/llvm
# GCC looks for tools in a different path from LLD's default installation path
define HOST_LLD_CREATE_SYMLINKS
mkdir -p $(HOST_DIR)/$(GNU_TARGET_NAME)/bin
- ln -sf $(HOST_DIR)/bin/lld $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/lld
- ln -sf $(HOST_DIR)/bin/lld $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/ld.lld
+ ln -sfr $(HOST_DIR)/bin/lld $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/lld
+ ln -sfr $(HOST_DIR)/bin/lld $(HOST_DIR)/$(GNU_TARGET_NAME)/bin/ld.lld
endef
HOST_LLD_POST_INSTALL_HOOKS += HOST_LLD_CREATE_SYMLINKS
--
2.43.0
--
*t.+33 438 020 555 *
More information about the buildroot
mailing list