3 @@ -560,6 +560,7 @@ while 1:
7 + libgcc_link = "-lgcc"
9 symbols.update(library_symbols_used[library])
11 @@ -575,6 +576,10 @@ while 1:
12 symbols.add(ProvidedSymbol('__uClibc_init', None, None, True))
13 symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True))
14 extra_flags.append("-Wl,-init,__uClibc_init")
15 + libgcc_link = "-lgcc_s_pic"
17 + if soname in ("libm.so.0"):
18 + libgcc_link = "-lgcc_s_pic"
20 map_file = find_pic_map(library)
22 @@ -590,7 +595,7 @@ while 1:
24 cmd.extend(extra_post_obj)
25 cmd.extend(extra_flags)
27 + cmd.append(libgcc_link)
28 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 + "/")]])
29 cmd.append(library_depends_gcc_libnames(so_file, soname))
30 command(target + "gcc", *cmd)