1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-16 04:03:56 +02:00
openwrt/tools/mklibs/patches/002-disable_symbol_checks.patch
Daniel Golle 9437012b9e tools/mklibs: update to 0.1.44 and convert to Python 3
Since the switch to Python 3 build fails if CONFIG_USE_MKLIBS is set
("Strip unnecessary functions from libraries" in menuconfig) as
mklibs hasn't been converted to run on Python 3.

 * update to most recent upstream version which brings some
   reproducibility fixes
 * converted to Python 3 using 2to3
 * fixed mixed tab/spaces indentation
 * fixed use of string.* functions
 * some more minor fixes to make Python 3 happy

Fixes commit 19938c8de7 ("build: switch to Python 3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2019-07-26 23:50:21 +02:00

21 lines
825 B
Diff

--- a/src/mklibs
+++ b/src/mklibs
@@ -533,7 +533,7 @@ while 1:
# No progress in last pass. Verify all remaining symbols are weak.
for name in unresolved:
if not needed_symbols[name].weak:
- raise Exception("Unresolvable symbol %s" % name)
+ print "WARNING: Unresolvable symbol %s" % name
break
previous_pass_unresolved = unresolved
@@ -568,7 +568,7 @@ while 1:
for name in needed_symbols:
if not name in symbol_provider:
if not needed_symbols[name].weak:
- raise Exception("No library provides non-weak %s" % name)
+ print "WARNING: Unresolvable symbol %s" % name
else:
lib = symbol_provider[name]
library_symbols_used[lib].add(library_symbols[lib][name])