[OpenWrt-Devel] [PATCH] nls.mk: add -rpath-link when needed
Ted Hess
thess at kitschensync.net
Sun Aug 30 15:36:27 EDT 2015
+1 on this. I have tested this already on about 10 packages OK.
After this patch is applied, I think there are approx. 24 packages which are potentially affected - though somewhat benign. Updating
them to remove unnecessary LDFLAGS fixups would be a good thing to do. I have put together a list of candidates for these updates
and will be submitting patches for them after the new nls.mk has been checked in and new builds are tested.
/ted
Here's the list I am working on at the moment:
The following are in the dev repo:
package/libs/elfutils (remove TARGET_LDFLAGS)
The following are in the packages repo:
mail/alpine (remove unecessary DISABLE_NLS; package-defaults.mk sets it correctly)
utils/crelay (remove TARGET_LDFLAGS)
utils/lcd4linux (remove EXTRA_LDFLAGS)
utils/dosfstools (fixup LDFLAGS, LDLIBS)
utils/smstools3 (remove TARGET_LDFLAGS; fixup USER_LDFLAGS)
net/seafile-server (fixup TARGET_LDFLAGS)
net/seafile-ccnet (fixup TARGET_LDFLAGS)
net/dmapd (remove TARGET_LDFLAGS)
lang/vala (remove TARGET_LDFLAGs)
multimedia/minidlna (remove LDFLAGS and ICONV_LIBS)
multimedia/gstreamer1 (remove EXTRA_LDFLAGS)
multimedia/gst1-plugins-* (remove EXTRA_LDFLAGS)
sound/mpd (remove TARGET_LDFLAGS)
Remove TARGET_LDFLAGS from:
--------------
libs/vips
libs/libsoup
libs/libmms
libs/libsearpc
libs/libimobiledevice
libs/libdmapsharing
libs/apr-util (remove explicit -liconv)
-----Original Message-----
Date: Sat, 29 Aug 2015 14:33:33 +0300
From: Paul Fertser <fercerpav at gmail.com>
To: openwrt-devel at lists.openwrt.org
Cc: Paul Fertser <fercerpav at gmail.com>
Subject: [OpenWrt-Devel] [PATCH] nls.mk: add -rpath-link when needed
for NLS support
Message-ID: <1440848013-1222-1-git-send-email-fercerpav at gmail.com>
When a package links to a shared library that depends on libiconv or
libintl shared libraries, specifying directory pathes to them via -L
switches is not enough, see "man 1 ld" -rpath-link description.
Signed-off-by: Paul Fertser <fercerpav at gmail.com>
---
include/nls.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/nls.mk b/include/nls.mk
index 118000d..51463b9 100644
--- a/include/nls.mk
+++ b/include/nls.mk
@@ -28,12 +28,12 @@ PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:libintl
ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
-ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib
+ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib
INTL_DEPENDS:=+BUILD_NLS:libintl-full
INTL_CFLAGS:=-I$(INTL_PREFIX)/include
INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
-INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib
+INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib
TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS)
TARGET_CPPFLAGS += $(ICONV_CPPFLAGS) $(INTL_CPPFLAGS)
--
2.0.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list