This is an archive of the discontinued LLVM Phabricator instance.

Improve support of the ncurses dependency on NetBSD
AbandonedPublic

Authored by krytarowski on Sep 19 2015, 1:00 PM.

Details

Reviewers
joerg
Summary

Summary of the changes:

  • add config.h (CMake and autotools target).
  • Handle ncurses with a proper CMake find_package() call
  • Handle ncurses panel library with proper find_library()
  • Stop hardcoding broken '-lncurses -lpanel' entries
  • Handle pkgsrc/NetBSD headers location (<ncurses/ncurses.h>)

Diff Detail

Repository
rL LLVM

Event Timeline

krytarowski retitled this revision from to Improve support of the ncurses dependency on NetBSD.
krytarowski updated this object.
krytarowski added a reviewer: joerg.
krytarowski set the repository for this revision to rL LLVM.
krytarowski added a subscriber: lldb-commits.
brucem added a subscriber: brucem.Sep 27 2015, 11:45 PM

Some mostly superficial comments.

I'd like to hear if anyone else has an opinion about using a Config.h generated by cmake & autotools.

I'm also not sure offhand how this would impact the Xcode build that the Apple folks use.

And I didn't see anything that sets autoconf stuff to generate that new config.h.in?

cmake/modules/LLDBConfig.cmake
284

Typo here: ncureses

include/lldb/Config/config.h.cmake
7

This should be LLDB_CONFIG_CONFIG_H rather than just CONFIG_H.

Also, why not use the same #ifndef technique that everything else uses in the header files?

7

Also, other headers in LLDB tend to have capitalized names, so maybe this should be include/lldb/Config/Config.h.cmake.

include/lldb/Config/config.h.in
7

Same as for config.h.cmake.

labath added a subscriber: labath.Sep 28 2015, 1:12 AM

I'm also not sure offhand how this would impact the Xcode build that the Apple folks use.

Since the xcode build is only used on Darwin, I think we can hardcode any #defines that are needed in the xcode project.

krytarowski added inline comments.Sep 28 2015, 3:55 AM
include/lldb/Config/config.h.cmake
7

I was following the clang/llvm approach of exclusing llvm's config.h and subprojects' one.

krytarowski added inline comments.Sep 29 2015, 2:55 AM
include/lldb/Config/config.h.cmake
7

There is already preliminary NetBSD support merged with trunk, I need this commit (or altered version of it) to build lldb against ncurses on this platform.

Thank you for your time.

krytarowski abandoned this revision.Oct 23 2015, 7:18 PM

Closing. We are going for reuse of the NetBSD native curses(8) library.

The reason for it is limit of detecting ncurses on various systems. For example, Ubuntu ships with <curses.h> and linkage from <ncurses.h>, ncurses.h isn't detected by CMake. Detecting <curses.h> on NetBSD is reusing conflicting header from the host curses(8) and pkgsrc's ncurses library.