3 @@ -105,14 +105,14 @@ def library_depends(obj):
5 # Return a list of libraries the passed objects depend on. The
6 # libraries are in "-lfoo" format suitable for passing to gcc.
7 -def library_depends_gcc_libnames(obj):
8 +def library_depends_gcc_libnames(obj, soname):
9 if not os.access(obj, os.F_OK):
10 raise "Cannot find lib: " + obj
11 libs = library_depends(obj)
14 match = re.match("^(((?P<ld>ld\S*)|(lib(?P<lib>\S+))))\.so.*$", i)
16 + if match and not soname in ("libpthread.so.0"):
18 ret.append(find_lib(match.group(0)))
19 elif match.group('lib'):
20 @@ -592,7 +592,7 @@ while 1:
21 cmd.extend(extra_flags)
23 cmd.extend(["-L%s" % a for a in [dest_path] + [sysroot + b for b in lib_path if sysroot == "" or b not in ("/" + libdir + "/", "/usr/" + libdir + "/")]])
24 - cmd.append(library_depends_gcc_libnames(so_file))
25 + cmd.append(library_depends_gcc_libnames(so_file, soname))
26 command(target + "gcc", *cmd)