From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 27 Dec 2012 17:03:43 -0700 Subject: [U-Boot] [PATCH 01/15] fdt: Use sed instead of cpp to pre-process the dtc In-Reply-To: <1356560913-2205-2-git-send-email-sjg@chromium.org> References: <1356560913-2205-1-git-send-email-sjg@chromium.org> <1356560913-2205-2-git-send-email-sjg@chromium.org> Message-ID: <50DCE1DF.7040206@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 12/26/2012 03:28 PM, Simon Glass wrote: > Include file support in dtc is still not available in common distributions > so we need to keep our preprocessing arrangement around for a little > longer. > > But # is commonly used in FDT files, so use sed instead of cpp for this > preprocessing. This sounds like the wrong approach to me. I'd suggest using what I proposed for the kernel: > cmd_dtc_cpp = $(CPP) $(cpp_flags) -D__DTS__ -x assembler-with-cpp -o $(dtc-tmp) $< ; \ > $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp) The "-x assembler-with-cpp" is what solves the # problem IIRC.