When building out-of-tree $(srctree) is typically a relative path, the
kbuild 6.1 sync uses it in more places where KBUILD_SRC was used leading
to issues like this where we create broken symlinks.

Fix this by creating the symlink with an absolute path like the old
behaviour.

Fixes: bd3f9ee679b4 ("kbuild: Bump the build system to 6.1")
Signed-off-by: Casey Connolly <[email protected]>
---
 scripts/Makefile.autoconf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index e3c88badb529..522389e04e8c 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -137,9 +137,9 @@ ifdef building_out_of_srctree
                dest=arch/$(ARCH)/mach-$(SOC)/include/mach;                     
\
        else                                                                    
\
                dest=arch/$(ARCH)/include/asm/arch-$(if $(SOC),$(SOC),$(CPU));  
\
        fi;                                                                     
\
-       ln -fsn $(srctree)/$$dest include/asm/arch
+       ln -fsn $$(realpath $(srctree)/$$dest) include/asm/arch
 else
        $(Q)if [ -d arch/$(ARCH)/mach-$(SOC)/include/mach ]; then       \
                dest=../../mach-$(SOC)/include/mach;                    \
        else                                                            \
-- 
2.51.0

Reply via email to