[tools] mklibs: upgrade to 0.1.37
[openwrt/svn-archive/archive.git] / tools / mklibs / patches / 005-duplicate_syms.patch
1 --- a/src/mklibs
2 +++ b/src/mklibs
3 @@ -529,7 +529,6 @@
4
5 library_symbols = {}
6 library_symbols_used = {}
7 - symbol_provider = {}
8
9 # WORKAROUND: Always add libgcc on old-abi arm
10 header = elf_header(find_lib(libraries.copy().pop()))
11 @@ -547,20 +546,13 @@
12 library_symbols_used[library] = set()
13 for symbol in symbols:
14 for name in symbol.base_names():
15 - if name in symbol_provider:
16 - debug(DEBUG_SPAM, "duplicate symbol %s in %s and %s" % (symbol, symbol_provider[name], library))
17 - else:
18 - library_symbols[library][name] = symbol
19 - symbol_provider[name] = library
20 + library_symbols[library][name] = symbol
21
22 # which symbols are actually used from each lib
23 for name in needed_symbols:
24 - if not name in symbol_provider:
25 - if not needed_symbols[name].weak:
26 - print "WARNING: Unresolvable symbol %s" % name
27 - else:
28 - lib = symbol_provider[name]
29 - library_symbols_used[lib].add(library_symbols[lib][name])
30 + for lib in libraries:
31 + if name in library_symbols[lib]:
32 + library_symbols_used[lib].add(library_symbols[lib][name])
33
34 # reduce libraries
35 for library in libraries: