Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] toolchain: follow symlinks in ld.*so.* install helper
@ 2024-12-07 20:36 Sergey Matyukevich
  2024-12-07 20:47 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Sergey Matyukevich @ 2024-12-07 20:36 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Giulio Benetti, Romain Naour,
	Sergey Matyukevich

Current toolchain install helper fails to setup external toolchains with
merged-usr sysroot. It does not follow lib symlinks when looking for
ld.*.so.* files. As a result builds fail with various linker errors.
Follow symlinks in find tool when installing ld*.so.* linker scripts
from external toolchain directory to staging and target directories.

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
---
 toolchain/helpers.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk
index f3fdaaec07..92ad53d064 100644
--- a/toolchain/helpers.mk
+++ b/toolchain/helpers.mk
@@ -140,8 +140,8 @@ copy_toolchain_sysroot = \
 			$(call simplify_symlink,$$i,$(STAGING_DIR)) ; \
 		done ; \
 	fi ; \
-	if [[ ! $$(find $(STAGING_DIR)/lib -name 'ld*.so.*' -print -quit) ]]; then \
-		find $${ARCH_SYSROOT_DIR}/lib -name 'ld*.so.*' -print0 | xargs -0 -I % cp % $(STAGING_DIR)/lib/; \
+	if [[ ! $$(find -L $(STAGING_DIR)/lib -name 'ld*.so.*' -print -quit) ]]; then \
+		find -L $${ARCH_SYSROOT_DIR}/lib -name 'ld*.so.*' -print0 | xargs -0 -I % cp % $(STAGING_DIR)/lib/; \
 	fi ; \
 	if [ `readlink -f $${SYSROOT_DIR}` != `readlink -f $${ARCH_SYSROOT_DIR}` ] ; then \
 		if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \
-- 
2.47.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-01-21 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-07 20:36 [Buildroot] [PATCH] toolchain: follow symlinks in ld.*so.* install helper Sergey Matyukevich
2024-12-07 20:47 ` Thomas Petazzoni via buildroot
2024-12-08 20:06   ` Sergey Matyukevich
2025-01-21 18:31     ` Sergey Matyukevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox