From: Adrian Fiergolski <adrian.fiergolski-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
To: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: error when compiling dts preprocessed with -g3
Date: Tue, 8 Jun 2021 12:47:45 +0200 [thread overview]
Message-ID: <3f28c86d-064d-ec68-e8de-f1dcd38c08ca@fastree3d.com> (raw)
In-Reply-To: <YL7vh7JkjymjKsQD@yekko>
Hi David,
Thanks for your message.
I found a workaround for this issue and as I raised the problem almost a
year ago, I would need time to reproduce it, which unfortunately I can't
afford these days. Thus I can't support you in debugging this anymore.
Regards,
Adrian
On 08.06.2021 06:18, David Gibson wrote:
> On Thu, Aug 20, 2020 at 01:32:17PM +0200, Adrian Fiergolski wrote:
>> Hi David,
>>
>> Thank you for your reply.
>>
>> On 20.08.2020 12:27, David Gibson wrote:
>>> On Fri, Aug 14, 2020 at 08:13:22PM +0200, Adrian Fiergolski wrote:
>>>> Hi,
>>>>
>>>> I am using yocto to build my custom distribution targetting arm64 on
>>>> Ubuntu 18.04.4.
>>>>
>>>> I have an issue compiling dts which was preprocessed with gcc version
>>>> 7.5.0 (I haven't tried other version) and '-g3' flag. The error message:
>>> Huh. It's surprising to me that -g options affect the preprocessor
>>> behavior at all.
>>>
>>>> ./scripts/dtc/dtc -O dtb -o
>>>> arch/arm64/boot/dts/xilinx/zynqmp-falcon.dtb -b 0
>>>> -i/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/
>>>> -i/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/scripts/dtc/include-prefixes
>>>> -Wno-unit_address_vs_reg -Wno-unit_address_format
>>>> -Wno-avoid_unnecessary_addr_size -Wno-alias_paths
>>>> -Wno-graph_child_address -Wno-simple_bus_reg
>>>> -Wno-unique_unit_address -Wno-pci_device_reg -d
>>>> arch/arm64/boot/dts/xilinx/.zynqmp-falcon.dtb.d.dtc.tmp
>>>> arch/arm64/boot/dts/xilinx/.zynqmp-falcon.dtb.dts.tmp
>>>>
>>>> Error: <built-in>:1.1-2 syntax error
>>>> FATAL ERROR: Unable to parse input tree
>>>>
>>>> The part of a preprocessed dts causing issue:
>>>>
>>>> # 1
>>>> "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp-falcon.dts"
>>>> # 1
>>>> "/home/afiergol/fastree/falcon/poky/build/tmp/work/falcon_zynqmp-poky-linux/linux-xlnx/5.4+gitAUTOINC+22b71b4162-r0/linux-falcon_zynqmp-standard-build//"
>>>> # 1 "<built-in>"
>>>> #define __STDC__ 1
>>> If it's preprocessed already, why does it still have #defines?
>>>
>>> This is the cause of the problem - the dtc lexer can hande the lines
>>> in the preprocessor output with file/linue number information, but it
>>> doesn't expect there to be remaining preprocessor directives.
>> Yes, it's preprocessed already by gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0.
>>
>> Are you able to reproduce the issue (any dts including dtsi should give
>> similar results)?
> No, I haven't been able to reproduce this problem. I did hit a
> different problem in the area, where cpp was generating line number
> information in a format the dtc lexer didn't expect. I've just pushed
> a fix for that.
>
> But leaving in #defines in preprocessed code really looks like a
> problem with how the preprocessor is invoked, not with dtc. If I'm
> going to debug this without more messing around than I have time for,
> please give me *specific* dts/dtsi files to attempt this, and
> *exactly* how the preprocessor is being invoked.
>
next prev parent reply other threads:[~2021-06-08 10:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-14 18:13 error when compiling dts preprocessed with -g3 Adrian Fiergolski
[not found] ` <f03fc1a5-14c9-5f87-84ee-0936f7e13ad2-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2020-08-20 10:27 ` David Gibson
[not found] ` <20200820102734.GR271315-l+x2Y8Cxqc4e6aEkudXLsA@public.gmane.org>
2020-08-20 11:32 ` Adrian Fiergolski
[not found] ` <594ead88-fd44-76ac-8c63-6337ac77a032-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-06-08 4:18 ` David Gibson
2021-06-08 10:47 ` Adrian Fiergolski [this message]
[not found] ` <3f28c86d-064d-ec68-e8de-f1dcd38c08ca-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-12 13:16 ` Adrian Fiergolski
[not found] ` <f6ac309b-c3af-583e-1bce-e869fa129b3f-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-12 13:38 ` Rob Herring
[not found] ` <CAL_JsqK52nM1LwjBYJ+iEWYEipimaJ=8vA-Nw5SSJ7x+OAxGXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-10-12 14:47 ` Adrian Fiergolski
[not found] ` <c28927c6-4fd1-f047-7c04-d54af609e699-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-12 16:50 ` Rob Herring
[not found] ` <CAL_Jsq+q-vNyUok3O7To0KCSG=hcGzHnf4k7tTr=0J3VFUSVjg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2021-10-14 9:39 ` Adrian Fiergolski
[not found] ` <84be5fc0-0199-aec5-e739-610ba6cf0409-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
2021-10-14 22:00 ` Richard Purdie
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=3f28c86d-064d-ec68-e8de-f1dcd38c08ca@fastree3d.com \
--to=adrian.fiergolski-/a8szzjb9pj2efz/2meucq@public.gmane.org \
--cc=david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@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).