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)? Regards, Adrian