devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* error when compiling dts preprocessed with -g3
@ 2020-08-14 18:13 Adrian Fiergolski
       [not found] ` <f03fc1a5-14c9-5f87-84ee-0936f7e13ad2-/A8SZzjb9pj2eFz/2MeuCQ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Adrian Fiergolski @ 2020-08-14 18:13 UTC (permalink / raw)
  To: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA

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:

    ./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
    #define __ASSEMBLER__ 1
    #define __STDC_HOSTED__ 1
    # 1 "<command-line>"
    #define __DTS__ 1
    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp-falcon.dts"
    # 11
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp-falcon.dts"
    /dts-v1/;

    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp.dtsi"
    1
    # 15
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp.dtsi"
    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/scripts/dtc/include-prefixes/dt-bindings/power/xlnx-zynqmp-power.h"
    1

The full command preprocessing dts:

    gcc -O0 -g3 -fno-omit-frame-pointer
    -L/home/afiergol/fastree/falcon/poky/build/tmp/work/falcon_zynqmp-poky-linux/linux-xlnx/5.4+gitAUTOINC+22b71b4162-r0/recipe-sysroot-native/usr/lib
    -L/home/afiergol/fastree/falcon/poky/build/tmp/work/falcon_zynqmp-poky-linux/linux-xlnx/5.4+gitAUTOINC+22b71b4162-r0/recipe-sysroot-native/lib
    -Wl,--enable-new-dtags
    -Wl,-rpath-link,/home/afiergol/fastree/falcon/poky/build/tmp/work/falcon_zynqmp-poky-linux/linux-xlnx/5.4+gitAUTOINC+22b71b4162-r0/recipe-sysroot-native/usr/lib
    -Wl,-rpath-link,/home/afiergol/fastree/falcon/poky/build/tmp/work/falcon_zynqmp-poky-linux/linux-xlnx/5.4+gitAUTOINC+22b71b4162-r0/recipe-sysroot-native/lib
    -Wl,-rpath,/home/afiergol/fastree/falcon/poky/build/tmp/work/falcon_zynqmp-poky-linux/linux-xlnx/5.4+gitAUTOINC+22b71b4162-r0/recipe-sysroot-native/usr/lib
    -Wl,-rpath,/home/afiergol/fastree/falcon/poky/build/tmp/work/falcon_zynqmp-poky-linux/linux-xlnx/5.4+gitAUTOINC+22b71b4162-r0/recipe-sysroot-native/lib
    -Wl,-O1 -Wl,--allow-shlib-undefined
    -Wl,--dynamic-linker=/home/afiergol/fastree/falcon/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2
    -E $(dtc_cpp_flags) -x assembler-with-cpp -o
    arch/arm64/boot/dts/xilinx/.zynqmp-falcon.dtb.dts.tmp

Once the '-g3' flag is removed, the part of the preprocessed DTS looks
like this:

    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp-falcon.dts"
    # 1 "<built-in>"
    # 1 "<command-line>"
    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp-falcon.dts"
    # 11
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp-falcon.dts"
    /dts-v1/;

    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp.dtsi"
    1
    # 15
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp.dtsi"
    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/scripts/dtc/include-prefixes/dt-bindings/power/xlnx-zynqmp-power.h"
    1
    # 16
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp.dtsi"
    2
    # 1
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/scripts/dtc/include-prefixes/dt-bindings/reset/xlnx-zynqmp-resets.h"
    1
    # 17
    "/home/afiergol/fastree/falcon/poky/build/tmp/work-shared/falcon-zynqmp/kernel-source/arch/arm64/boot/dts/xilinx/zynqmp.dtsi"
    2

And the device compiler succeeds.

Is it a known behaviour?

Regards,

Adrian



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-14 22:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [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

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).