Page MenuHomePhabricator

Embed libpanel(3) for NetBSD-7.0
AbandonedPublic

Authored by krytarowski on Nov 15 2015, 4:51 PM.

Details

Reviewers
emaste
clayborg
Summary

The libpanel(3) library was developed after the NetBSD-7.0 release.
This curses' extension lib is used within lldb.

There were few ways to address this lack of functionality in the base:
a. require ncurses in 7.0 (ncurses it's not a part of base in NetBSD)
b. provide external package library with libpanel in pkgsrc
c. mix native curses with ncurses' panel
d. embed libpanel in lldb

I was trying to go for a) and b), but it was trouble some increasing
complexity of Makefiles and sources and it required additional paths from
command line, as pkgsrc with ncurses may be installed in freely given prefix.
b) and c) resulted in conflicts.

Go for d) as it's the simplest solution:

  • it doesn't require pkgsrc neither any externally specified libpanel,
  • this approach is already in use for getopt_long_only(3),
  • no need to ifdefing paths for libraries and headers of curses(3), ncurses headers are prefixed with a directory 'ncurses/' and source code will need to be fixed for it,
  • paradoxically it doesn't require changes in the common code like the other solutions,
  • it doesn't need manually specified paths from command line,
  • it's self-containing.

The libpanel library is relatively tiny and built only for the NetBSD target.

With this diff I can built LLDB on NetBSD using CMake.

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski retitled this revision from to Embed libpanel(3) for NetBSD-7.0.
krytarowski updated this object.
krytarowski added reviewers: clayborg, emaste.
krytarowski set the repository for this revision to rL LLVM.
krytarowski updated this object.
krytarowski added subscribers: lldb-commits, brucem.
krytarowski added a subscriber: joerg.
joerg added a comment.Nov 16 2015, 1:50 AM

I'd settle for requiring ncurses for 7.0 and get libpanel into 7.1.

Can't you address this issue with compiling LLDB on NetBSD with -DLLDB_DISABLE_CURSES?

If you want to go with the current approach then you should add somebody who can verify that committing it in to the LLVM source tree is fine from licensing perspective (I don't know who).

krytarowski abandoned this revision.Nov 16 2015, 4:39 PM

I will go with other way around. If curses(3) or libpanel(3) is missing, disable the curses(3) option for LLDB.