[Buildroot] [git commit branch/2025.02.x] package/llvm-project/lld: fix broken symlink in SDK
Thomas Perale
thomas.perale at mind.be
Thu Sep 18 14:44:31 UTC 2025
commit: https://git.buildroot.net/buildroot/commit/?id=57bcfe9caa9ff3edd36d404753ea17edc1fd491e
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2025.02.x
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>
Signed-off-by: Romain Naour <romain.naour at smile.fr>
(cherry picked from commit 289dd6bd7641d98b1a7edd84a707474873cd17a5)
Signed-off-by: Thomas Perale <thomas.perale at mind.be>
---
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 539dd0bd71..0c1fce4860 100644
--- a/package/llvm-project/lld/lld.mk
+++ b/package/llvm-project/lld/lld.mk
@@ -18,8 +18,8 @@ HOST_LLD_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
# 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
More information about the buildroot
mailing list