From: Stephen Warren <swarren@wwwdotorg.org> To: Michal Marek <mmarek@suse.cz>, Grant Likely <glikely@secretlab.ca>, Rob Herring <robherring2@gmail.com> Cc: arm@kernel.org, Shawn Guo <shawn.guo@linaro.org>, Hiroshi Doyu <hdoyu@nvidia.com>, linux-kbuild@vger.kernel.org, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stephen Warren <swarren@nvidia.com> Subject: [PATCH V2 4/7] kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp Date: Wed, 3 Apr 2013 17:34:55 -0600 [thread overview] Message-ID: <1365032098-22825-4-git-send-email-swarren@wwwdotorg.org> (raw) In-Reply-To: <1365032098-22825-1-git-send-email-swarren@wwwdotorg.org> From: Stephen Warren <swarren@nvidia.com> Replace cmd_dtc with cmd_dtc_cpp, and delete the latter. Previously, a special file extension (.dtsp) was required to trigger the C pre-processor to run on device tree files. This was ugly. Now that previous changes have enhanced cmd_dtc_cpp to collect dependency information from both gcc -E and dtc, we can transparently run the pre- processor on all device tree files, irrespective of whether they Signed-off-by: Stephen Warren <swarren@nvidia.com> --- v2: Add boot/dts from the source tree to dtc include path, so that make O= works; that puts the .dts file that's passed to dtc outside the source tree, so the include path adjustment is required to find include files in the source tree. --- scripts/Makefile.lib | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 6104335..3e73dfd 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -269,21 +269,17 @@ $(obj)/%.dtb.S: $(obj)/%.dtb $(call cmd,dt_S_dtb) quiet_cmd_dtc = DTC $@ -cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< +cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ + $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ + -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \ + -d $(depfile).dtc $(dtc-tmp) ; \ + cat $(depfile).pre $(depfile).dtc > $(depfile) $(obj)/%.dtb: $(src)/%.dts FORCE $(call if_changed_dep,dtc) dtc-tmp = $(subst $(comma),_,$(dot-target).dts) -quiet_cmd_dtc_cpp = DTC+CPP $@ -cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ - $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile).dtc $(dtc-tmp) ; \ - cat $(depfile).pre $(depfile).dtc > $(depfile) - -$(obj)/%.dtb: $(src)/%.dtsp FORCE - $(call if_changed_dep,dtc_cpp) - # Bzip2 # --------------------------------------------------------------------------- -- 1.7.10.4
WARNING: multiple messages have this Message-ID (diff)
From: swarren@wwwdotorg.org (Stephen Warren) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V2 4/7] kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp Date: Wed, 3 Apr 2013 17:34:55 -0600 [thread overview] Message-ID: <1365032098-22825-4-git-send-email-swarren@wwwdotorg.org> (raw) In-Reply-To: <1365032098-22825-1-git-send-email-swarren@wwwdotorg.org> From: Stephen Warren <swarren@nvidia.com> Replace cmd_dtc with cmd_dtc_cpp, and delete the latter. Previously, a special file extension (.dtsp) was required to trigger the C pre-processor to run on device tree files. This was ugly. Now that previous changes have enhanced cmd_dtc_cpp to collect dependency information from both gcc -E and dtc, we can transparently run the pre- processor on all device tree files, irrespective of whether they Signed-off-by: Stephen Warren <swarren@nvidia.com> --- v2: Add boot/dts from the source tree to dtc include path, so that make O= works; that puts the .dts file that's passed to dtc outside the source tree, so the include path adjustment is required to find include files in the source tree. --- scripts/Makefile.lib | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 6104335..3e73dfd 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -269,21 +269,17 @@ $(obj)/%.dtb.S: $(obj)/%.dtb $(call cmd,dt_S_dtb) quiet_cmd_dtc = DTC $@ -cmd_dtc = $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile) $< +cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ + $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ + -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \ + -d $(depfile).dtc $(dtc-tmp) ; \ + cat $(depfile).pre $(depfile).dtc > $(depfile) $(obj)/%.dtb: $(src)/%.dts FORCE $(call if_changed_dep,dtc) dtc-tmp = $(subst $(comma),_,$(dot-target).dts) -quiet_cmd_dtc_cpp = DTC+CPP $@ -cmd_dtc_cpp = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ - $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) -d $(depfile).dtc $(dtc-tmp) ; \ - cat $(depfile).pre $(depfile).dtc > $(depfile) - -$(obj)/%.dtb: $(src)/%.dtsp FORCE - $(call if_changed_dep,dtc_cpp) - # Bzip2 # --------------------------------------------------------------------------- -- 1.7.10.4
next prev parent reply other threads:[~2013-04-03 23:35 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-04-03 23:34 [PATCH V2 1/7] kbuild: create an "include chroot" for DT bindings Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-03 23:34 ` [PATCH V2 2/7] kbuild: fixdep: support concatenated dep files Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-03 23:34 ` [PATCH V2 3/7] kbuild: cmd_dtc_cpp: extract deps from both gcc -E and dtc Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-03 23:34 ` Stephen Warren [this message] 2013-04-03 23:34 ` [PATCH V2 4/7] kbuild: always run gcc -E on *.dts, remove cmd_dtc_cpp Stephen Warren 2013-04-04 0:02 ` Emilio López 2013-04-04 0:02 ` Emilio López 2013-04-04 16:41 ` Stephen Warren 2013-04-04 16:41 ` Stephen Warren 2013-04-03 23:34 ` [PATCH V2 5/7] ARM: dt: add header to define GPIO flags Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-03 23:34 ` [PATCH V2 6/7] ARM: dt: add header to define IRQ flags Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-03 23:34 ` [PATCH V2 7/7] ARM: dt: create a DT header for the GIC Stephen Warren 2013-04-03 23:34 ` Stephen Warren 2013-04-04 23:17 ` [PATCH V2 1/7] kbuild: create an "include chroot" for DT bindings Rob Herring 2013-04-04 23:17 ` Rob Herring 2013-04-05 1:01 ` Stephen Warren 2013-04-05 1:01 ` Stephen Warren 2013-04-05 16:06 ` Rob Herring 2013-04-05 16:06 ` Rob Herring 2013-04-05 16:06 ` Rob Herring 2013-04-19 10:01 ` Grant Likely 2013-04-19 10:01 ` Grant Likely
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1365032098-22825-4-git-send-email-swarren@wwwdotorg.org \ --to=swarren@wwwdotorg.org \ --cc=arm@kernel.org \ --cc=devicetree-discuss@lists.ozlabs.org \ --cc=glikely@secretlab.ca \ --cc=hdoyu@nvidia.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mmarek@suse.cz \ --cc=robherring2@gmail.com \ --cc=shawn.guo@linaro.org \ --cc=swarren@nvidia.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.