Bug 233405 - sparc64: DWARF unwinder required for GCC 4.2.1 retirement
Summary: sparc64: DWARF unwinder required for GCC 4.2.1 retirement
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: sparc64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks: 228919 233094
  Show dependency treegraph
 
Reported: 2018-11-22 14:41 UTC by Ed Maste
Modified: 2019-08-14 16:38 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer 2018-11-22 14:41:26 UTC
GCC 4.2.1's retirement is expected before FreeBSD 13.0. This will also remove GCC's libgcc including the DWARF unwinder.

LLVM's libunwind provides the replacement for most architectures but does not currently support sparc64.
Comment 1 Conrad Meyer freebsd_committer 2018-11-22 17:51:20 UTC
(We could also retire sparc64 before 13.0.)
Comment 2 Ed Maste freebsd_committer 2019-08-14 16:19:19 UTC
Attempting to enable LLVM libunwind on sparc64 resulted in:

In file included from /scratch/tmp/emaste/freebsd/contrib/libunwind/src/libunwind.cpp:29:
/scratch/tmp/emaste/freebsd/contrib/libunwind/src/UnwindCursor.hpp:1155:3: error: static_assert failed due to requirement 'check_fit<libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_sparc>, unw_cursor_t>::does_fit' "UnwindCursor<> does not fit in unw_cursor_t"
  static_assert((check_fit<UnwindCursor<A, R>, unw_cursor_t>::does_fit),
  ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/scratch/tmp/emaste/freebsd/contrib/libunwind/src/libunwind.cpp:78:24: note: in instantiation of member function 'libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_sparc>::UnwindCursor' requested here
  new ((void *)cursor) UnwindCursor<LocalAddressSpace, REGISTER_KIND>(
                       ^
Comment 3 Conrad Meyer freebsd_committer 2019-08-14 16:34:33 UTC
Would an acceptable unwind implementation on Sparc be "raise(SIGKILL);"?
Comment 4 Ed Maste freebsd_committer 2019-08-14 16:38:34 UTC
(In reply to Conrad Meyer from comment #3)
Sure, if those who have an interest in FreeBSD/sparc64 want to make that change and are happy enough with the result.