upstream_dtsi_include uses $(if (CONFIG_ARM64), ...), where
"(CONFIG_ARM64)" is a literal string rather than a variable
reference. Make evaluates it as the condition, which is always
non-empty, so the arm64 upstream dtsi include directories are added
unconditionally regardless of the target architecture.

Use $(CONFIG_ARM64) so the condition correctly evaluates the Kconfig
symbol, gating the arm64 include directories on the actual target
configuration.

Fixes: 3a4e5944c96c ("Makefile: Allow upstream DT subtree to provide DT 
includes")
Signed-off-by: Suraj Kakade <[email protected]>
---
 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 122c8e78204..24b1a581790 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -251,7 +251,7 @@ dtsi_include_list = $(strip $(u_boot_dtsi_options_debug) \
 upstream_dtsi_include = $(addprefix -I, $(srctree)/dts/upstream/src/ \
        $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/$(ARCH)/*/*))) \
        $(sort $(dir $(wildcard $(srctree)/dts/upstream/src/$(ARCH)/*/*/*))) \
-       $(if (CONFIG_ARM64), \
+       $(if $(CONFIG_ARM64), \
                 $(sort $(dir $(wildcard 
$(srctree)/dts/upstream/src/arm64/*/*))) \
                 $(sort $(dir $(wildcard 
$(srctree)/dts/upstream/src/arm64/*/*/*)))))
 dtc_cpp_flags  = -Wp,-MD,$(depfile).pre.tmp -nostdinc                    \
-- 
2.43.7

Reply via email to