[package] elfutils: link with libargp
authorFlorian Fainelli <florian@openwrt.org>
Thu, 7 Jul 2011 08:07:35 +0000 (08:07 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 7 Jul 2011 08:07:35 +0000 (08:07 +0000)
SVN-Revision: 27506

libs/elfutils/Makefile
libs/elfutils/patches/006-libdw_LIBS.patch [new file with mode: 0644]

index 6bf702905c00f6e69e0e947b3fab5dc42106a3e4..790e44f1443c923c5ace1d47e5b5b5615a878ae1 100644 (file)
@@ -22,7 +22,7 @@ include $(INCLUDE_DIR)/nls.mk
 define Package/elfutils/Default
   SECTION:=libs
   CATEGORY:=Libraries
-  DEPENDS:=$(INTL_DEPENDS)
+  DEPENDS:=$(INTL_DEPENDS) +USE_UCLIBC:argp-standalone
   TITLE:=ELF manipulation libraries
   URL:=https://fedorahosted.org/elfutils/
 endef
@@ -37,6 +37,11 @@ define Package/libdw
   TITLE+= (libdw)
 endef
 
+ifdef CONFIG_USE_UCLIBC
+CONFIGURE_VARS += \
+       LIBS="-largp"
+endif
+
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
diff --git a/libs/elfutils/patches/006-libdw_LIBS.patch b/libs/elfutils/patches/006-libdw_LIBS.patch
new file mode 100644 (file)
index 0000000..1cca414
--- /dev/null
@@ -0,0 +1,24 @@
+diff -urN elfutils-0.152/libdw//Makefile.am elfutils-0.152.new/libdw/Makefile.am
+--- elfutils-0.152/libdw//Makefile.am  2010-09-10 15:18:31.000000000 +0200
++++ elfutils-0.152.new/libdw/Makefile.am       2011-07-07 09:47:25.041354790 +0200
+@@ -108,7 +108,7 @@
+               -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+               -Wl,--version-script,$<,--no-undefined \
+               -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+-              -ldl $(zip_LIBS)
++              -ldl $(zip_LIBS) $(LIBS)
+       if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
+       ln -fs $@ $@.$(VERSION)
+diff -urN elfutils-0.152/libdw//Makefile.in elfutils-0.152.new/libdw/Makefile.in
+--- elfutils-0.152/libdw//Makefile.in  2011-07-06 20:22:31.161366385 +0200
++++ elfutils-0.152.new/libdw/Makefile.in       2011-07-07 09:47:16.631354792 +0200
+@@ -839,7 +839,7 @@
+ @MUDFLAP_FALSE@               -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ @MUDFLAP_FALSE@               -Wl,--version-script,$<,--no-undefined \
+ @MUDFLAP_FALSE@               -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+-@MUDFLAP_FALSE@               -ldl $(zip_LIBS)
++@MUDFLAP_FALSE@               -ldl $(zip_LIBS) $(LIBS)
+ @MUDFLAP_FALSE@       if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi
+ @MUDFLAP_FALSE@       ln -fs $@ $@.$(VERSION)