Skip to content

netbsd-curses

  • Check if util-linux links against libtinfo.so and if passing -lterminfo resolves it
  • Check if libedit, pcre2 and util-linux explicitly require passing -lterminfo to LIBS and LDFLAGS
  • netbsd-curses attempts to run nbperf and tic on the build system even when “cross-compiled”
  • If CC equals HOSTCC then netbsd-curses assumes we are not cross-compiling and sets CROSSCOMPILING=0
  • While this is correct for gcc, this is wrong for clang as it is a cross-compiler by default given the right set of CFLAGS
  • CROSSCOMPILING=1 prevents CFLAGS from leaking into CFLAGS_HOST causing nbperf and tic to be natively built with HOSTCC
  • CC="clang $CFLAGS" and HOSTCC=clang also fixes this but is suboptimal
  • Do not provide captoinfo or infotocap as symlinks to tic as netbsd-curses’s tic does not support -I or -C
  • --as-needed ensures that only what is needed is being used from libcurses.so and libterminfo.so
  • Pass -lcurses -lterminfo in this order