https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101283
--- Comment #11 from Iain Sandoe <iains at gcc dot gnu.org> --- (In reply to Indu Bhagat from comment #10) > (In reply to Iain Sandoe from comment #9) > > (In reply to Iain Sandoe from comment #8) > > > we are now left with (where I suspect that the remaining fails are an > > > artefact of the way in which Darwin represents offsets instead of > > > relocations in DWARF debug sections): > > > > on a bit more looking, that is probably not the reason - I guess we will > > have to look at what the represented structures are and why they have > > different renderings for Darwin. > > I am looking into these failures one by one. It seems that the issue is as you noted on IRC, that Darwin defaults to generating DWARF-2. I have confirmed that overriding this to DWARF-4 for btf/ctf fixes the test fails - I'll make an interim patch to do this in Darwin's option processing. However, I guess the bottom line question is "do you intend to support versions of DWARF earlier than 4 as a source for BTF/CTF"? The corner-case comes when a user enables both CTF and DWARF, in which case we could be demanding a higher version of DWARF to support CTF than the system tools can handle for the dwarf output.