aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Ambardar <itugrok@yahoo.com>2021-03-28 00:40:31 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2021-04-10 14:22:28 +0200
commit879cbd9e97bb4cf1c87f907946c6be0e8d46a1fd (patch)
treede8dbe1cc47da7521651d845a10b121616e440c6
parentf88459de25820b56371765525f6d2a3fa19b575a (diff)
downloadupstream-879cbd9e97bb4cf1c87f907946c6be0e8d46a1fd.tar.gz
upstream-879cbd9e97bb4cf1c87f907946c6be0e8d46a1fd.tar.bz2
upstream-879cbd9e97bb4cf1c87f907946c6be0e8d46a1fd.zip
binutils: fix libbfd missing DSO dependency if NLS enabled
The libbfd package definition uses $(ICONV_DEPENDS) and $(INTL_DEPENDS) but links against neither, leading to libbfd detection failures in other packages (e.g. bpftools) and on-target relocation problems with libintl.so: root@OpenWrt:/# ldd /usr/lib/libbfd.so ldd (0x77db6000) libc.so => ldd (0x77db6000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x77c6d000) Error relocating /usr/lib/libbfd.so: libintl_dgettext: symbol not found Add NLS-conditional linking of "libintl" to fix this. Also remove libbfd package dependency $(ICONV_DEPENDS) which is not used during building or linking. Tested with QEMU on malta/be32, after building all packages from binutils, bpftools and iproute2, using different libc options musl and glibc. Fixes: 08e817569630 ("binutils: use nls.mk to fix libbfd link errors in other packages") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> (cherry picked from commit 9a59f62f613b1ca774032ccd80c51c74491b142c)
-rw-r--r--package/devel/binutils/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile
index 23f1ea9c25..790fb1e91a 100644
--- a/package/devel/binutils/Makefile
+++ b/package/devel/binutils/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=binutils
PKG_VERSION:=2.35.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE_URL:=@GNU/binutils
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -34,7 +34,7 @@ define Package/libbfd
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libbfd
- DEPENDS:=+zlib $(ICONV_DEPENDS) $(INTL_DEPENDS)
+ DEPENDS:=+zlib $(INTL_DEPENDS)
endef
define Package/libctf
@@ -79,6 +79,8 @@ endef
TARGET_CFLAGS += $(FPIC) -Wno-unused-value
+TARGET_LDFLAGS += $(if $(INTL_FULL),-lintl)
+
CONFIGURE_ARGS += \
--host=$(REAL_GNU_TARGET_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \