Support DWARF 5
编译OpenJ9-OpenJDK时,我收到此错误:
[ 0%] Generating /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/runtime/j9ddr.dat, /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/superset.dat
Error: /tmp/openj9-openjdk-jdk16-0.27.0-release/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp:114 getSourcelist - Getting compilation directory string: DW_DLE_STRP_OFFSET_BAD(204)
Error: /tmp/openj9-openjdk-jdk16-0.27.0-release/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp:1524 traverse_cu_in_debug_section - Failed to get source file list.
Error: /tmp/openj9-openjdk-jdk16-0.27.0-release/omr/ddr/lib/ddr-scanner/dwarf/DwarfScanner.cpp:1591 startScan - Failure scanning /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/runtime/libj9ddr_misc29.debuginfo
gmake[10]: *** [CMakeFiles/j9ddr.dir/build.make:749: /tmp/openj9-openjdk-jdk16-0.27.0-release/build/linux-x86_64-server-release/vm/runtime/j9ddr.dat] Error 1
I think this is related to https://gcc.gnu.org/gcc-11/changes.html:
对于生产矮人调试信息的目标,现在默认为矮版5(vxworks和darwin/mac OS X除外,默认为版本2和AIX默认为版本4)。与早期版本相比,这可以产生多达25%的紧凑型调试信息。
可以通过指定-GDWARF -4来解决这一点,但是最好支持现代矮人。
我在Gentoo Linux上使用GCC 11.2.0和Libdwarf 20210305进行此编译。
I just bumped into this problem while (native) building on RISC-V (gcc 11.2.0). Has been there any progress on this? Shall I just hack build scripts to pass -gdwarf-4
?
I looked at it briefly, but didn't have time to even collect a consistent set of tools. I'd be surprised if gcc-11 works without #6301 that addresses code problems that cause failures with gcc-10. I think using -gdwarf-4
in the meantime is reasonable
I'd be surprised if gcc-11 works without #6301 On RISC-V there's no JIT so this is no problem. I'll use -gdwarf-4
temporarily.