This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Use -gdwarf-3 by default for FreeBSD
AbandonedPublic

Authored by MaskRay on Aug 4 2018, 1:13 AM.

Details

Summary

The imported binutils in base supports DWARF 3.

Diff Detail

Event Timeline

MaskRay created this revision.Aug 4 2018, 1:13 AM

I'm using this change: https://github.com/emaste/freebsd/commit/1c3deab6d518feb1a7e88de5b342a139e4022a21

In FreeBSD 12 and later we use Clang, lld, and ELF Tool Chain. (We still have gas and objdump from the outdated binutils 2.17.50.)

I'm using this change: https://github.com/emaste/freebsd/commit/1c3deab6d518feb1a7e88de5b342a139e4022a21

In FreeBSD 12 and later we use Clang, lld, and ELF Tool Chain. (We still have gas and objdump from the outdated binutils 2.17.50.)

Will you upstream this commit (I can abandon this one)? I created this revision because I was learning clangDriver... I had a vague and probably incorrect impression that some folks said kgdb or dtrace or whatever might not support DWARF 3 or 4.

I'm using this change: https://github.com/emaste/freebsd/commit/1c3deab6d518feb1a7e88de5b342a139e4022a21

In FreeBSD 12 and later we use Clang, lld, and ELF Tool Chain. (We still have gas and objdump from the outdated binutils 2.17.50.)

Will you upstream this commit (I can abandon this one)? I created this revision because I was learning clangDriver... I had a vague and probably incorrect impression that some folks said kgdb or dtrace or whatever might not support DWARF 3 or 4.

Hmm, somehow I forgot about this until being reminded by @arichardson just now. I will upstream it.

The primary motivation for staying with DWARF2 was indeed kgdb, based on gdb 6.1.1, and dtrace (specifically dtrace's build tool ctfconvert) also did not support DWARF >2. However, these issues have all been addressed:

  1. We're deprecating gdb 6.1.1-based kgdb, using a contemporary gdb port.
  2. In any case the kernel is still building with explicit -gdwarf2 today so it doesn't matter anyhow, there's no need for the toolchain default to be set based on the kernel's needs.
  3. DTrace tooling limitations arose as a side effect of our (well, ELF Tool Chain's) libdwarf but it has been updated to handle DWARF4 some time ago.

Perhaps I should just upload a new diff to this review?

Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2019, 1:07 PM
MaskRay abandoned this revision.Sep 3 2019, 9:36 AM

Abandon due to D66760