iproute2: fix libbpf detection with NLS enabled
authorTony Ambardar <itugrok@yahoo.com>
Sat, 27 Mar 2021 12:43:03 +0000 (05:43 -0700)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 3 Apr 2021 16:56:02 +0000 (18:56 +0200)
commitaab3a04ce87c27996b7ce9ea306db8c6eed86941
treea2f8bd625845d91d4903e3646293cc1fcc3a8f37
parent9a59f62f613b1ca774032ccd80c51c74491b142c
iproute2: fix libbpf detection with NLS enabled

Upstream iproute2 detects libbpf using a one-line $CC test-compile, which
normally ignores LDFLAGS. With NLS enabled however, LDFLAGS includes an
"rpath-link" linker option needed to resolve libintl.so. Its absence
causes both the compile and libbpf detection to fail:

  ld: warning: libintl.so.8, needed by libbpf.so, not found (try using
      -rpath or -rpath-link)
  ld: libelf.so.1: undefined reference to `libintl_dgettext'
  collect2: error: ld returned 1 exit status

Fix this by directly including $LDFLAGS in the test-compile command.

Reported-by: Ian Cooper <iancooper@hotmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
package/network/utils/iproute2/Makefile
package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch [new file with mode: 0644]