diff options
author | Stephen Warren <swarren@nvidia.com> | 2013-03-06 12:28:02 -0500 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-04-05 14:23:04 -0400 |
commit | 85f02be8e5fd48a9bf8c719a4f12b4209b1e55b5 (patch) | |
tree | 7dad81db6892ab67dbd4178ece3a033a427d76ab /scripts | |
parent | 2ab8a99661f4ce052bbad064237c441371df8751 (diff) |
kbuild: cmd_dtc_cpp: extract deps from both gcc -E and dtc
Prior to this change, when compiling *.dts to *.dtb, the dependency
output from dtc would be used, and when compiling *.dtsp to *.dtb, the
dependency output from gcc -E alone would be used, despite dtc also
being invoked (on a temporary file that was guaranteed to have no
dependencies).
With this change, when compiling *.dtsp to *.dtb, the dependency files
from both gcc -E and dtc are used. This will allow cmd_dtc_cpp to
replace cmd_dtc in a future change. In turn, that will allow the C pre-
processor to be run transparently on *.dts, without the need to a
separate rule or file extension to trigger it.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.lib | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index af35521b00a4..6104335234c6 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -156,7 +156,7 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ | |||
156 | 156 | ||
157 | ld_flags = $(LDFLAGS) $(ldflags-y) | 157 | ld_flags = $(LDFLAGS) $(ldflags-y) |
158 | 158 | ||
159 | dtc_cpp_flags = -Wp,-MD,$(depfile) -nostdinc \ | 159 | dtc_cpp_flags = -Wp,-MD,$(depfile).pre -nostdinc \ |
160 | -I$(srctree)/arch/$(SRCARCH)/boot/dts \ | 160 | -I$(srctree)/arch/$(SRCARCH)/boot/dts \ |
161 | -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ | 161 | -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ |
162 | -undef -D__DTS__ | 162 | -undef -D__DTS__ |
@@ -278,7 +278,8 @@ dtc-tmp = $(subst $(comma),_,$(dot-target).dts) | |||
278 | 278 | ||
279 | quiet_cmd_dtc_cpp = DTC+CPP $@ | 279 | quiet_cmd_dtc_cpp = DTC+CPP $@ |
280 | cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ | 280 | cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ |
281 | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp) | 281 | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile).dtc $(dtc-tmp) ; \ |
282 | cat $(depfile).pre $(depfile).dtc > $(depfile) | ||
282 | 283 | ||
283 | $(obj)/%.dtb: $(src)/%.dtsp FORCE | 284 | $(obj)/%.dtb: $(src)/%.dtsp FORCE |
284 | $(call if_changed_dep,dtc_cpp) | 285 | $(call if_changed_dep,dtc_cpp) |