From b12869a8d519cbb887866c295dc39df00d646898 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 25 Jul 2017 11:23:34 +0900 Subject: of: remove drivers/of/testcase-data from include search path for CPP This search path was added by commit b5190516b282 ("of: Move testcase FDT data into drivers/of"). At that time, it was needed for platform DT files to include testcase data. It became unnecessary when commit ae9304c9d311 ("Adding selftest testdata dynamically into live tree") introduced dynamic addition of testcase data, but it missed to delete this search path. Moreover, the directory drivers/of/testcase-data does not exist since commit 19fd74879a32 ("of/unittest: Rename selftest.c to unittest.c"). Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring --- scripts/Makefile.lib | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 58c05e5d9870..011d464d2132 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -176,7 +176,6 @@ ld_flags = $(LDFLAGS) $(ldflags-y) dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ -I$(srctree)/arch/$(SRCARCH)/boot/dts \ -I$(srctree)/scripts/dtc/include-prefixes \ - -I$(srctree)/drivers/of/testcase-data \ -undef -D__DTS__ # Finds the multi-part object the current object will be linked into -- cgit v1.2.3-70-g09d2 From 5ffa2aed389c8f204e57ef361a78340a4bfcffc9 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 25 Jul 2017 11:23:35 +0900 Subject: of: remove arch/$(SRCARCH)/boot/dts from include search path for CPP Having arch/$(SRCARCH)/boot/dts as an include search path is not very useful these days because some architectures such as ARM64, MIPS have no DT in this directory. Instead, they have DT in vendor sub-directories. With some DT files in ARM and PowerPC fixed, we can now drop this include search path. Signed-off-by: Masahiro Yamada Signed-off-by: Rob Herring --- scripts/Makefile.lib | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 011d464d2132..9c8f38ac2620 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -174,7 +174,6 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ ld_flags = $(LDFLAGS) $(ldflags-y) dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ - -I$(srctree)/arch/$(SRCARCH)/boot/dts \ -I$(srctree)/scripts/dtc/include-prefixes \ -undef -D__DTS__ -- cgit v1.2.3-70-g09d2 From 50f9ddaf64e1338eaaef6697ad5b8ae210da0d60 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 25 Jul 2017 11:23:36 +0900 Subject: 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 Signed-off-by: Rob Herring --- scripts/Makefile.lib | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts') 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) \ ld_flags = $(LDFLAGS) $(ldflags-y) +DTC_INCLUDE := $(srctree)/scripts/dtc/include-prefixes + dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ - -I$(srctree)/scripts/dtc/include-prefixes \ + $(addprefix -I,$(DTC_INCLUDE)) \ -undef -D__DTS__ # Finds the multi-part object the current object will be linked into @@ -315,7 +317,7 @@ quiet_cmd_dtc = DTC $@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ $(DTC) -O dtb -o $@ -b 0 \ - -i $(dir $<) $(DTC_FLAGS) \ + $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ -d $(depfile).dtc.tmp $(dtc-tmp) ; \ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) -- cgit v1.2.3-70-g09d2