[kernel] fix mtd warnings
[openwrt.git] / tools / mklibs / patches / 009-uclibc_libgcc_link.patch
1 --- a/src/mklibs.py
2 +++ b/src/mklibs.py
3 @@ -112,11 +112,8 @@ def library_depends_gcc_libnames(obj, so
4 ret = []
5 for i in libs:
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'))
12 + if match:
13 + ret.append(find_lib(match.group(0)))
14 return ' '.join(ret)
15
16 class Symbol(object):
17 @@ -560,6 +557,7 @@ while 1:
18 extra_flags = []
19 extra_pre_obj = []
20 extra_post_obj = []
21 + libgcc_link = find_lib("libgcc_s.so.1")
22
23 symbols.update(library_symbols_used[library])
24
25 @@ -590,9 +588,10 @@ while 1:
26 cmd.append(pic_file)
27 cmd.extend(extra_post_obj)
28 cmd.extend(extra_flags)
29 - cmd.append("-lgcc")
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":
33 + cmd.append(library_depends_gcc_libnames(so_file, soname))
34 + cmd.append(libgcc_link)
35 command(target + "gcc", *cmd)
36
37 ## DEBUG
This page took 0.074096 seconds and 5 git commands to generate.