]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
scripts/Makefile.autoconf: use abs_srctree for out-of-tree symlink
authorDavid Lechner <dlechner@baylibre.com>
Mon, 5 Jan 2026 20:35:04 +0000 (14:35 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 6 Jan 2026 20:42:48 +0000 (14:42 -0600)
Replace usage of $(srctree) with $(abs_srctree) when creating a symlink
to include/asm/arch in out of tree builds.

When building_out_of_srctree is true, $(srctree) is just "..", so the
created symlink was broken, for example:

    build-mt8365_evk/include/asm/arch -> ../arch/arm/include/asm/arch-mediatek

Which would resolve to a non-existent path:

    build-mt8365_evk/include/asm/arch/arm/include/asm/arch-mediatek

To fix, we need to use the absolute path to the source tree since we
don't know where the build tree is located relative to the source tree.

Fixes: bd3f9ee679b4 ("kbuild: Bump the build system to 6.1")
Signed-off-by: David Lechner <dlechner@baylibre.com>
Tested-by: Sean Anderson <sean.anderson@linux.dev>
scripts/Makefile.autoconf

index e3c88badb529a96a446a9601bed379a4d541e100..47c49a018bfff1f67b0fff36b6c1ac629ba596cc 100644 (file)
@@ -138,7 +138,7 @@ ifdef building_out_of_srctree
        else                                                                    \
                dest=arch/$(ARCH)/include/asm/arch-$(if $(SOC),$(SOC),$(CPU));  \
        fi;                                                                     \
-       ln -fsn $(srctree)/$$dest include/asm/arch
+       ln -fsn $(abs_srctree)/$$dest include/asm/arch
 else
        $(Q)if [ -d arch/$(ARCH)/mach-$(SOC)/include/mach ]; then       \
                dest=../../mach-$(SOC)/include/mach;                    \