aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-07-24 22:23:36 -0400
committerRob Herring <robh@kernel.org>2017-08-21 13:20:14 -0400
commit50f9ddaf64e1338eaaef6697ad5b8ae210da0d60 (patch)
tree50c9be81f7f6d0b0d661a89e07742c03b343c521
parent5ffa2aed389c8f204e57ef361a78340a4bfcffc9 (diff)
of: search scripts/dtc/include-prefixes path for both CPP and DTC
Since commit d5d332d3f7e8 ("devicetree: Move include prefixes from arch to separate directory"), cross-arch DT reference works well, but only for CPP style #include directives. It makes as much sense to share DT between different architectures by using DTC's /include/ directives. So, scripts/dtc/include-prefixes should be passed to both CPP and DTC. I refactored Makefile.lib a bit to not repeat the same path. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--scripts/Makefile.lib6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 9c8f38ac2620..dcc0d5fdf5a2 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -173,8 +173,10 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
173 173
174ld_flags = $(LDFLAGS) $(ldflags-y) 174ld_flags = $(LDFLAGS) $(ldflags-y)
175 175
176DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes
177
176dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ 178dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \
177 -I$(srctree)/scripts/dtc/include-prefixes \ 179 $(addprefix -I,$(DTC_INCLUDE)) \
178 -undef -D__DTS__ 180 -undef -D__DTS__
179 181
180# Finds the multi-part object the current object will be linked into 182# Finds the multi-part object the current object will be linked into
@@ -315,7 +317,7 @@ quiet_cmd_dtc = DTC $@
315cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ 317cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
316 $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ 318 $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
317 $(DTC) -O dtb -o $@ -b 0 \ 319 $(DTC) -O dtb -o $@ -b 0 \
318 -i $(dir $<) $(DTC_FLAGS) \ 320 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \
319 -d $(depfile).dtc.tmp $(dtc-tmp) ; \ 321 -d $(depfile).dtc.tmp $(dtc-tmp) ; \
320 cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) 322 cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
321 323