aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.lib
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2013-04-09 15:59:04 -0400
committerRob Herring <rob.herring@calxeda.com>2013-04-09 15:59:04 -0400
commita2f682aeeecfa791de19de63509566d156d0d1a3 (patch)
treee291ca2915e4fc61e3a47ccf2fceedd084f6fba3 /scripts/Makefile.lib
parentd450f445f9a654080a6be4094376c2192d9a1f36 (diff)
parent4be505d4fc7a07371a2b658469ca1dda99993ca3 (diff)
Merge tag 'tegra-for-3.10-dtc-cpp-chroot-std-headers' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra into for-next
Pull DT C pre-processor changes from Stephen Warren: dt: run C pre-processor on *.dts, create some standard headers This branch enhances the support for running dtc on device tree files. A dedicated directory is created for header files that provide constants for device-tree bindings. The kbuild dependency script processor is enhanced to support processing the dependency outputs from multiple separate commands at once. The kbuild dtc rule is modified so that the C pre-processor is always applied when compiling any device tree. Some standard headers are created which define common constants for GPIO, IRQ, and ARM GIC device tree bindings.
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r--scripts/Makefile.lib17
1 files changed, 7 insertions, 10 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 07125e697d7a..3e73dfd838cd 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -156,9 +156,9 @@ cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \
156 156
157ld_flags = $(LDFLAGS) $(ldflags-y) 157ld_flags = $(LDFLAGS) $(ldflags-y)
158 158
159dtc_cpp_flags = -Wp,-MD,$(depfile) -nostdinc \ 159dtc_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)/include/dts \ 161 -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \
162 -undef -D__DTS__ 162 -undef -D__DTS__
163 163
164# Finds the multi-part object the current object will be linked into 164# Finds the multi-part object the current object will be linked into
@@ -269,20 +269,17 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
269 $(call cmd,dt_S_dtb) 269 $(call cmd,dt_S_dtb)
270 270
271quiet_cmd_dtc = DTC $@ 271quiet_cmd_dtc = DTC $@
272cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< 272cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
273 $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
274 -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \
275 -d $(depfile).dtc $(dtc-tmp) ; \
276 cat $(depfile).pre $(depfile).dtc > $(depfile)
273 277
274$(obj)/%.dtb: $(src)/%.dts FORCE 278$(obj)/%.dtb: $(src)/%.dts FORCE
275 $(call if_changed_dep,dtc) 279 $(call if_changed_dep,dtc)
276 280
277dtc-tmp = $(subst $(comma),_,$(dot-target).dts) 281dtc-tmp = $(subst $(comma),_,$(dot-target).dts)
278 282
279quiet_cmd_dtc_cpp = DTC+CPP $@
280cmd_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)
282
283$(obj)/%.dtb: $(src)/%.dtsp FORCE
284 $(call if_changed_dep,dtc_cpp)
285
286# Bzip2 283# Bzip2
287# --------------------------------------------------------------------------- 284# ---------------------------------------------------------------------------
288 285