<div dir="ltr">What was the intent of the last hunk in fix_cross_compile.patch? It essentially undoes the following upstream mklibs change, but it doesn't seem related to whether or not dpkg is used.<div><br></div><div><a href="http://bazaar.launchpad.net/~ubuntu-installer/mklibs/master/revision/101">http://bazaar.launchpad.net/~ubuntu-installer/mklibs/master/revision/101</a><br></div><div><a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256998">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256998</a><br></div><div><br></div><div>It also causes breakage in image-mklibs.bbclass in a multilib setup where there are symlinks to the dynamic loader in both /lib and /lib64 (find returns more than one result when trying to cp out of mklibs/dest).</div><div><br></div><div>Should that hunk be reverted?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 3, 2015 at 1:42 AM, <span dir="ltr"><<a href="mailto:rongqing.li@windriver.com" target="_blank">rongqing.li@windriver.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Yuanjie Huang <<a href="mailto:yuanjie.huang@windriver.com">yuanjie.huang@windriver.com</a>><br>
<br>
1. Show GNU unique symbols as provided symbols<br>
2. Remove dependency on dpkg<br>
Both have been submitted to mklibs maillist:<br>
<a href="https://lists.debian.org/debian-boot/2015/07/msg00018.html" rel="noreferrer" target="_blank">https://lists.debian.org/debian-boot/2015/07/msg00018.html</a><br>
<a href="https://lists.debian.org/debian-boot/2015/07/msg00004.html" rel="noreferrer" target="_blank">https://lists.debian.org/debian-boot/2015/07/msg00004.html</a><br>
<br>
Signed-off-by: Yuanjie Huang <<a href="mailto:yuanjie.huang@windriver.com">yuanjie.huang@windriver.com</a>><br>
Signed-off-by: Roy Li <<a href="mailto:rongqing.li@windriver.com">rongqing.li@windriver.com</a>><br>
---<br>
.../mklibs/files/fix_cross_compile.patch | 81 ++++++++++++++++++++++<br>
...ow-GNU-unique-symbols-as-provided-symbols.patch | 34 +++++++++<br>
.../mklibs/<a href="http://mklibs-native_0.1.40.bb" rel="noreferrer" target="_blank">mklibs-native_0.1.40.bb</a> | 2 +<br>
3 files changed, 117 insertions(+)<br>
create mode 100644 meta/recipes-devtools/mklibs/files/fix_cross_compile.patch<br>
create mode 100644 meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch<br>
<br>
diff --git a/meta/recipes-devtools/mklibs/files/fix_cross_compile.patch b/meta/recipes-devtools/mklibs/files/fix_cross_compile.patch<br>
new file mode 100644<br>
index 0000000..7eb8659<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/mklibs/files/fix_cross_compile.patch<br>
@@ -0,0 +1,81 @@<br>
+Remove dependency on dpkg<br>
+<br>
+Upstream-Status Submitted<br>
+<br>
+Asking the host OS whether it supports multiarch is not useful<br>
+in a cross-compilation environment, or if the user has specified<br>
+a libdir explicitly. So this patch, based on the work of Mentor<br>
+Graphics, removes mklibs's dependency on dpkg package.<br>
+<br>
+Signed-off-by: Yuanjie Huang <<a href="mailto:Yuanjie.Huang@windriver.com">Yuanjie.Huang@windriver.com</a>><br>
+ src/mklibs | 30 +++++++++++++++++++-----------<br>
+ 1 file changed, 19 insertions(+), 11 deletions(-)<br>
+<br>
+diff --git a/src/mklibs b/src/mklibs<br>
+index d9b784b..c5614ea 100755<br>
+--- a/src/mklibs<br>
++++ b/src/mklibs<br>
+@@ -261,6 +261,11 @@ def extract_soname(so_file):<br>
+ return ""<br>
+<br>
+ def multiarch(paths):<br>
++ # Asking the host OS whether it supports multiarch is not useful<br>
++ # in a cross-compilation environment, or if the user has specified<br>
++ # a libdir explicitly.<br>
++ if sysroot != "" or libdir != "":<br>
++ return paths<br>
+ devnull = open('/dev/null', 'w')<br>
+ dpkg_architecture = subprocess.Popen(<br>
+ ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],<br>
+@@ -340,7 +345,7 @@ lib_path = []<br>
+ dest_path = "DEST"<br>
+ ldlib = "LDLIB"<br>
+ include_default_lib_path = "yes"<br>
+-default_lib_path = multiarch(["/lib/", "/usr/lib/", "/usr/X11R6/lib/"])<br>
++default_lib_path = ["/lib/", "/usr/lib/", "/usr/X11R6/lib/"]<br>
+ libc_extras_dir = "/usr/lib/libc_pic"<br>
+ libc_extras_dir_default = True<br>
+ libdir = "lib"<br>
+@@ -386,7 +391,7 @@ for opt, arg in optlist:<br>
+ elif opt == "--libdir":<br>
+ libdir = arg<br>
+ elif opt in ("--help", "-h"):<br>
+- usage(0)<br>
++ usage(0)<br>
+ sys.exit(0)<br>
+ elif opt in ("--version", "-V"):<br>
+ version(vers)<br>
+@@ -395,6 +400,7 @@ for opt, arg in optlist:<br>
+ print "WARNING: unknown option: " + opt + "\targ: " + arg<br>
+<br>
+ if include_default_lib_path == "yes":<br>
++ default_lib_path = multiarch(default_lib_path)<br>
+ lib_path.extend([a.replace("/lib/", "/" + libdir + "/") for a in default_lib_path])<br>
+<br>
+ if libc_extras_dir_default:<br>
+@@ -661,16 +669,16 @@ ld_path_name = os.path.dirname(ldlib)<br>
+ ld_full_path = "../" + ldlib<br>
+ ld_file = find_lib(ld_file_name)<br>
+<br>
+-if ld_path_name != "/lib":<br>
+- if os.access(dest_path + "/" + ld_file_name, os.F_OK):<br>
+- os.remove(dest_path + "/" + ld_file_name)<br>
++#if ld_path_name != "/lib":<br>
++# if os.access(dest_path + "/" + ld_file_name, os.F_OK):<br>
++# os.remove(dest_path + "/" + ld_file_name)<br>
+<br>
+-if not os.path.exists(dest_path + "/../" + ld_path_name):<br>
+- os.mkdir(dest_path + "/../" + ld_path_name)<br>
++#if not os.path.exists(dest_path + "/../" + ld_path_name):<br>
++# os.mkdir(dest_path + "/../" + ld_path_name)<br>
+<br>
+-if not os.access(dest_path + "/" + ld_full_path, os.F_OK):<br>
+- debug(DEBUG_NORMAL, "I: stripping and copying dynamic linker to " + ld_full_path)<br>
++if not os.access(dest_path + "/" + ld_file_name, os.F_OK):<br>
++ debug(DEBUG_NORMAL, "I: stripping and copying dynamic linker to " + ld_file_name)<br>
+ command(target + "objcopy", "--strip-unneeded -R .note -R .comment",<br>
+- ld_file, dest_path + "/" + ld_full_path)<br>
++ ld_file, dest_path + "/" + ld_file_name)<br>
+<br>
+-os.chmod(dest_path + "/" + ld_full_path, 0755)<br>
++os.chmod(dest_path + "/" + ld_file_name, 0755)<br>
diff --git a/meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch b/meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch<br>
new file mode 100644<br>
index 0000000..3f14ca1<br>
--- /dev/null<br>
+++ b/meta/recipes-devtools/mklibs/files/show-GNU-unique-symbols-as-provided-symbols.patch<br>
@@ -0,0 +1,34 @@<br>
+From eddf04c7f8312e9c29cdb24e431b7e4fb2cc70ed Mon Sep 17 00:00:00 2001<br>
+From: Yuanjie Huang <<a href="mailto:yuanjie.huang@windriver.com">yuanjie.huang@windriver.com</a>><br>
+Date: Wed, 15 Apr 2015 14:00:06 +0800<br>
+Subject: [PATCH] Show GNU unique symbols as provided symbols<br>
+<br>
+Upstream-Status Submitted<br>
+<br>
+GNU Unique symbol is a GNU extension employed by new version of GCC<br>
+by default. Even Standard C++ library in GCC 4.9 provides some symbols,<br>
+such as _ZNSs4_Rep20_S_empty_rep_storageE in this binding type instead<br>
+of ELF standard weak binding.<br>
+This patch adds support of this new binding type to mklibs-readelf.<br>
+<br>
+Signed-off-by: Yuanjie Huang <<a href="mailto:yuanjie.huang@windriver.com">yuanjie.huang@windriver.com</a>><br>
+---<br>
+ src/mklibs-readelf/main.cpp | 2 +-<br>
+ 1 file changed, 1 insertion(+), 1 deletion(-)<br>
+<br>
+diff --git a/src/mklibs-readelf/main.cpp b/src/mklibs-readelf/main.cpp<br>
+index 56d93f8..0134530 100644<br>
+--- a/src/mklibs-readelf/main.cpp<br>
++++ b/src/mklibs-readelf/main.cpp<br>
+@@ -88,7 +88,7 @@ static void process_symbols_provided (const Elf::section_type<Elf::section_type_<br>
+ uint8_t type = symbol->get_type ();<br>
+ const std::string &name = symbol->get_name_string ();<br>
+<br>
+- if (bind != STB_GLOBAL && bind != STB_WEAK)<br>
++ if (bind != STB_GLOBAL && bind != STB_WEAK && bind != STB_GNU_UNIQUE)<br>
+ continue;<br>
+ if (shndx == SHN_UNDEF || shndx == SHN_ABS)<br>
+ continue;<br>
+--<br>
+1.8.5.2.233.g932f7e4<br>
+<br>
diff --git a/meta/recipes-devtools/mklibs/<a href="http://mklibs-native_0.1.40.bb" rel="noreferrer" target="_blank">mklibs-native_0.1.40.bb</a> b/meta/recipes-devtools/mklibs/<a href="http://mklibs-native_0.1.40.bb" rel="noreferrer" target="_blank">mklibs-native_0.1.40.bb</a><br>
index 0bb5f21..d6905ac 100644<br>
--- a/meta/recipes-devtools/mklibs/<a href="http://mklibs-native_0.1.40.bb" rel="noreferrer" target="_blank">mklibs-native_0.1.40.bb</a><br>
+++ b/meta/recipes-devtools/mklibs/<a href="http://mklibs-native_0.1.40.bb" rel="noreferrer" target="_blank">mklibs-native_0.1.40.bb</a><br>
@@ -11,6 +11,8 @@ SRC_URI = "<a href="http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.x" rel="noreferrer" target="_blank">http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.x</a><br>
file://fix_STT_GNU_IFUNC.patch\<br>
file://sysrooted-ldso.patch \<br>
file://avoid-failure-on-symbol-provided-by-application.patch \<br>
+ file://show-GNU-unique-symbols-as-provided-symbols.patch \<br>
+ file://fix_cross_compile.patch \<br>
"<br>
<br>
SRC_URI[md5sum] = "e1dafe5f962caa9dc5f2651c0723812a"<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.1<br>
<br>
--<br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</font></span></blockquote></div><br></div>