compiler-explorer: [BUG]: clang default dwarf version being over-ridden?
Describe the bug
Consider: https://godbolt.org/z/3Wd8q8fax
I’m trying to find which version of clang defaulted to dwarf-v5 implicitly when -g is used. I know clang switched to dwarf-v5 recently, but godbolt shows clang trunk emitting dwarf-v4 (there’s an assembler directive denoting the dwarf version in the output).
.short 4 # DWARF version number
Steps to reproduce
enable -g for clang trunk (should be clang-16 today)
Expected behavior
.short 5 # DWARF version number
is what I get locally for clang trunk.
Is godbolt overriding this somehow?
Reproduction link
https://godbolt.org/z/3Wd8q8fax
Screenshots
Not applicable
Operating System
No response
Browser version
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (9 by maintainers)
Seems like GNU objdump can’t figure this out.
so testing [g++, clang++] x [objdump, llvm-objdump], it seems that it is GNU objdump that doesn’t understand the output from clang++; llvm-objdump supports both compilers.
I’ve filed https://sourceware.org/bugzilla/show_bug.cgi?id=29529 against GNU objdump.
This has been fixed up ToT GNU objdump. It just missed the 2.39 release, so probably whatever is after that should have the fix. Leaving this open until that release exists.