Page MenuHomePhabricator

clang: default to DWARF 4 for FreeBSD 12.0 and later
ClosedPublic

Authored by emaste on Aug 26 2019, 11:02 AM.

Details

Summary

Older FreeBSD versions included GDB 6.1 and had other tools that were unable to handle debug information newer than DWARF 2. Those tools have since been updated. (An old version of GDB is still kept for kernel crash handling, but the kernel is compiled with an explicit -gdwarf2.)

Diff Detail

Repository
rL LLVM

Event Timeline

emaste created this revision.Aug 26 2019, 11:02 AM

FreeBSD references:
https://reviews.freebsd.org/D17930
https://reviews.freebsd.org/rS343429

Note that in FreeBSD I used < 13 for the version test but all of the prereq changes were made in advance of FreeBSD 12.0.

Is this testable as a driver test?

clang/lib/Driver/ToolChains/FreeBSD.cpp
368 ↗(On Diff #217201)

Is getOSMAjorVersion a typo?

emaste updated this revision to Diff 218458.Sep 3 2019, 8:07 AM

Correct typo, update tests

emaste marked an inline comment as done.Sep 3 2019, 8:07 AM
emaste marked an inline comment as done.
emaste added inline comments.
clang/test/Driver/debug-options.c
69 ↗(On Diff #218458)

FreeBSD 10 is out of support now, so use 11 as the base case

dim accepted this revision.Sep 3 2019, 9:06 AM

LGTM

This revision is now accepted and ready to land.Sep 3 2019, 9:06 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 3 2019, 9:29 AM