3 @@ -112,11 +112,8 @@ def library_depends_gcc_libnames(obj, so
6 match = re.match("^(((?P<ld>ld\S*)|(lib(?P<lib>\S+))))\.so.*$", i)
7 - if match and not soname in ("libpthread.so.0"):
8 - if match.group('ld'):
9 - ret.append(find_lib(match.group(0)))
10 - elif match.group('lib'):
11 - ret.append('-l%s' % match.group('lib'))
13 + ret.append(find_lib(match.group(0)))
17 @@ -560,6 +557,7 @@ while 1:
21 + libgcc_link = find_lib("libgcc_s.so.1")
23 symbols.update(library_symbols_used[library])
25 @@ -590,9 +588,11 @@ while 1:
27 cmd.extend(extra_post_obj)
28 cmd.extend(extra_flags)
30 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 + "/")]])
31 - cmd.append(library_depends_gcc_libnames(so_file, soname))
32 + if soname != "libgcc_s.so.1" and soname != "libc.so.0":
33 + cmd.append(library_depends_gcc_libnames(so_file, soname))
34 + if soname != "libgcc_s.so.1":
35 + cmd.append(libgcc_link)
36 command(target + "gcc", *cmd)