Skip to contentSkip to conversation

binutils: Fix useless rpaths QA warning

PATCH New Khem Raj 1 participant 2 messages Feb 16, 2016

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH v2 1/2 binutils: Fix useless rpaths QA warning

elfedit and readelf contains /usr/lib in elf header this patch deletes them from binaries, ideally it should be fixed in libtool and Makery of binutils

mips target binutils dont build gold so remove them from ALTERNATIVES list

depend on own version of chrpath native, so builds on build OS like Centos can work, the verison of chrpath on centos is old enough to not support dealing with multi-arch ELF files.

---
 meta/recipes-devtools/binutils/binutils.inc | 11 +++++++++++
 1 file changed, 11 insertions(+)
meta/recipes-devtools/binutils/binutils.inc +11 -0
index 79e2a12..43e2aa2 100644
@@ -13,6 +13,12 @@ LICENSE = "GPLv3"
 
 DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native"
 
+#
+# we need chrpath > 0.14 and some distros like centos 7 still have older chrpath
+#
+DEPENDS_append_class-target = " chrpath-replacement-native"
+EXTRANATIVEPATH_append_class-target = " chrpath-native"
+
 inherit autotools gettext multilib_header texinfo
 
 FILES_${PN} = " \
@@ -51,6 +57,7 @@ USE_ALTERNATIVES_FOR = " \
 	strings \
 	strip \
 "
+USE_ALTERNATIVES_FOR_remove_mips = "ld.gold dwp"
 
 python do_package_prepend() {
     make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
@@ -111,6 +118,10 @@ do_configure () {
 	done
 }
 
+do_compile_append_class-target() {
+	chrpath -d ${B}/binutils/elfedit
+	chrpath -d ${B}/binutils/readelf
+}
 do_install () {
 	autotools_do_install
 
Signature · 1 line
1.8.3.1
author
#1 lore raw

PATCH 2/2 socat: Fix build with musl

NETDB_INTERNAL is a glibc define

---
 ...fine-NETDB_INTERNAL-to-1-if-not-available.patch | 32 ++++++++++++++++++++++
 meta/recipes-connectivity/socat/socat_1.7.3.1.bb   |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch
meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch new file +32 -0
new file mode 100644
index 0000000..4bbd367
@@ -0,0 +1,32 @@
+From e6a7d96fa3675bdd3f4d7a3d7682381789eef22f Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Mon, 15 Feb 2016 20:25:34 +0000
+Subject: [PATCH] define NETDB_INTERNAL to -1 if not available
+
+helps build with musl
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+Upstream-Status: Pending
+
+ compat.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/compat.h b/compat.h
+index c8bee4d..bfb013a 100644
+--- a/compat.h
++++ b/compat.h
+@@ -666,6 +666,10 @@ typedef int sig_atomic_t;
+ #  define NETDB_INTERNAL h_NETDB_INTERNAL
+ #endif
+ 
++#if !defined(NETDB_INTERNAL)
++#  define NETDB_INTERNAL (-1)
++#endif
++
+ #ifndef INET_ADDRSTRLEN
+ #  define INET_ADDRSTRLEN sizeof(struct sockaddr_in)
+ #endif
+-- 
+2.7.1
+
meta/recipes-connectivity/socat/socat_1.7.3.1.bb +1 -0
index c215e04..b9a8a2f 100644
@@ -14,6 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 
 SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
            file://Makefile.in-fix-for-parallel-build.patch \
+           file://0001-define-NETDB_INTERNAL-to-1-if-not-available.patch \
 "
 
 SRC_URI[md5sum] = "334e46924f2b386299c9db2ac22bcd36"
Signature · 1 line
1.8.3.1