devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinivas KANDAGATLA <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
To: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Michal Marek <mmarek-AlSwsSmVLrQ@public.gmane.org>,
	Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
	Grant Likely <glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
	Sam Ravnborg <sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org>
Subject: Re: [PATCH V7] kbuild: create a rule to run the pre-processor on *.dts files
Date: Fri, 01 Feb 2013 19:22:59 +0000	[thread overview]
Message-ID: <510C1613.6080601@st.com> (raw)
In-Reply-To: <510BF281.1080309-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1796 bytes --]

On 01/02/13 16:51, Rob Herring wrote:
> On 02/01/2013 03:01 AM, Srinivas KANDAGATLA wrote:
>> Hi Stephen,
>> Not sure if you have already noticed this but,
>> I did try this patch on my 3.8, and it looks like the intermediate dts
>> file replaces all instances of linux with 1 because of predefined macros
>> in gcc.
>> As a result
>>     linux,stdout-path = "/soc/stm-asc2";
>> is changed to.
>>     1,stdout-path = "/soc/stm-asc2";
>>
>> On my version of compiler(gcc version 4.6.3) I have
>>
>> armv7-linux-gcc -E -dM - < /dev/null | grep -v _
>> #define unix 1
>> #define linux 1
>>
>> Which might be true with most compiler versions aswell.
>> As we are using linux as prefix for some device tree properties it makes
>> sense to undef the linux gcc define.
>> Adding -Ulinux to cmd_dtc_cpp should fix it.
>>
>> -cmd_dtc_cpp = $(CPP) $(cpp_flags) -D__DTS__ -x assembler-with-cpp -o
>> $(dtc-tmp) $< ; \
>> +cmd_dtc_cpp = $(CPP) $(cpp_flags) -D__DTS__  -Ulinux -x
>> assembler-with-cpp -o $(dtc-tmp) $< ; \
>>     $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 $(DTC_FLAGS) $(dtc-tmp)
> That's a hackish solution that seems fragile as well. Is there no way to
> turn off all built-in defines?
Yes, there is another option to turn of system-specific options and keep
macros like __ASSEMBLER__

|-undef||(|Do not predefine any system-specific or GCC-specific macros.
The standard predefined macros remain defined. See Standard Predefined
Macros
<http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html#Standard-Predefined-Macros>.)
This option also worked for me.

--srini



>
> Rob
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
>


[-- Attachment #1.2: Type: text/html, Size: 2794 bytes --]

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

      parent reply	other threads:[~2013-02-01 19:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 18:43 [PATCH V7] kbuild: create a rule to run the pre-processor on *.dts files Stephen Warren
2013-01-12 17:03 ` Simon Glass
2013-01-14 14:53 ` Jean-Christophe PLAGNIOL-VILLARD
2013-02-01  9:01 ` Srinivas KANDAGATLA
2013-02-01 16:51   ` Rob Herring
2013-02-01 17:27     ` Stephen Warren
2013-02-01 19:25       ` Stephen Warren
2013-02-04  7:36         ` Srinivas KANDAGATLA
     [not found]     ` <510BF281.1080309-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-02-01 19:22       ` Srinivas KANDAGATLA [this message]

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=510C1613.6080601@st.com \
    --to=srinivas.kandagatla-qxv4g6hh51o@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=glikely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mmarek-AlSwsSmVLrQ@public.gmane.org \
    --cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=sam-uyr5N9Q2VtJg9hUCZPvPmw@public.gmane.org \
    --cc=scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).