noux-pkg/less: use LIBS when building tools

lesskey and lessecho missed the declaration of ${LIBS} on the compiler
command line, which ended up in unusable programs.

  > file noux-pkg/less/lesskey.broken
  noux-pkg/less/lesskey.broken: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter *empty*, not stripped
  > file noux-pkg/less/lesskey
  noux-pkg/less/lesskey: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter ld.lib.so, not stripped

The issue was identified because -O0 builds broke with

  ld: lesskey: The first section in the PT_DYNAMIC segment is not the .dynamic section

Unfortunately, this simple fix renders both tools also dependent to libm
and ncurses which they don't use.
This commit is contained in:
Christian Helmuth 2017-01-25 13:03:51 +01:00 committed by Norman Feske
parent 60c9192335
commit eccc539651
3 changed files with 16 additions and 2 deletions

View File

@ -1 +1 @@
58e87934afd2c2ed0f9bc808f23d838bdf578f69
c95e59f851e92a1f65e5332ce6fa2bf6ff3622bf

View File

@ -8,4 +8,4 @@ SIG(less) := ${URL(less)}.sig
KEY(less) := GNU
DIR(less) := src/noux-pkg/less
PATCHES := src/noux-pkg/less/tty_fd.patch
PATCHES := src/noux-pkg/less/tty_fd.patch src/noux-pkg/less/libs.patch

View File

@ -0,0 +1,14 @@
+++ src/noux-pkg/less/Makefile.in
@@ -57,10 +57,10 @@ less$(EXEEXT): ${OBJ}
${CC} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
lesskey$(EXEEXT): lesskey.${O} version.${O}
- ${CC} ${LDFLAGS} -o $@ lesskey.${O} version.${O}
+ ${CC} ${LDFLAGS} -o $@ lesskey.${O} version.${O} ${LIBS}
lessecho$(EXEEXT): lessecho.${O} version.${O}
- ${CC} ${LDFLAGS} -o $@ lessecho.${O} version.${O}
+ ${CC} ${LDFLAGS} -o $@ lessecho.${O} version.${O} ${LIBS}
${OBJ}: ${srcdir}/less.h ${srcdir}/funcs.h defines.h