[OE-core] [PATCH 36/36] mklibs-native: refresh patches

Alexander Kanavin alexander.kanavin at linux.intel.com
Fri Mar 9 18:56:14 UTC 2018


The patch tool will apply patches by default with "fuzz", which is where if the
hunk context isn't present but what is there is close enough, it will force the
patch in.

Whilst this is useful when there's just whitespace changes, when applied to
source it is possible for a patch applied with fuzz to produce broken code which
still compiles (see #10450).  This is obviously bad.

We'd like to eventually have do_patch() rejecting any fuzz on these grounds. For
that to be realistic the existing patches with fuzz need to be rebased and
reviewed.

Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
---
 ...failure-on-symbol-provided-by-application.patch | 25 +++++++++++-----------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch b/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
index 7d6d62e773b..17d9af4de42 100644
--- a/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
+++ b/meta/recipes-devtools/mklibs/files/avoid-failure-on-symbol-provided-by-application.patch
@@ -1,7 +1,7 @@
-From f172101130604e4a9efa5746f4d8d30de99a0fdc Mon Sep 17 00:00:00 2001
+From dcb45256970b15b672d0004533826c94083356e5 Mon Sep 17 00:00:00 2001
 From: Yuanjie Huang <yuanjie.huang at windriver.com>
 Date: Fri, 17 Apr 2015 14:48:20 +0800
-Subject: [PATCH] avoid failure on symbol provided by application
+Subject: [PATCH 4/6] avoid failure on symbol provided by application
 
 Upstream-Status: Pending
 
@@ -13,12 +13,13 @@ cannot be provided by libraries. It prevents false alarm on absence
 of symbols.
 
 Signed-off-by: Yuanjie Huang <yuanjie.huang at windriver.com>
+
 ---
  src/mklibs | 28 ++++++++++++++++++++++++----
  1 file changed, 24 insertions(+), 4 deletions(-)
 
 diff --git a/src/mklibs b/src/mklibs
-index c5614ea..b0d9034 100755
+index a3533c0..66b7a09 100755
 --- a/src/mklibs
 +++ b/src/mklibs
 @@ -133,9 +133,9 @@ class Symbol(object):
@@ -31,9 +32,9 @@ index c5614ea..b0d9034 100755
 -        self.weak, self.library = weak, library
 +        self.weak, self.library, self.object = weak, library, object
  
- # Return undefined symbols in an object as a set of tuples (name, weakness)
- def undefined_symbols(obj):
-@@ -144,6 +144,11 @@ def undefined_symbols(obj):
+ def symbol_is_blacklisted(name):
+     # The ARM Embedded ABI spec states symbols under this namespace as
+@@ -152,6 +152,11 @@ def undefined_symbols(obj):
  
      output = command("mklibs-readelf", "--print-symbols-undefined", obj)
  
@@ -45,7 +46,7 @@ index c5614ea..b0d9034 100755
      result = []
      for line in output:
          name, weak_string, version_string, library_string = line.split()[:4]
-@@ -160,7 +165,7 @@ def undefined_symbols(obj):
+@@ -171,7 +176,7 @@ def undefined_symbols(obj):
          if library_string.lower() != 'none':
              library = library_string
  
@@ -54,7 +55,7 @@ index c5614ea..b0d9034 100755
  
      return result
  
-@@ -495,12 +500,13 @@ while 1:
+@@ -498,12 +503,13 @@ while 1:
                       and re.search("^ps_", str(symbol)))
                  and not (re.search("ld-linux.so.3$", str(symbol)))
                  and not (re.search("^__gnu_local_gp", str(symbol)))):
@@ -68,8 +69,8 @@ index c5614ea..b0d9034 100755
 +    present_symbol_progs = {}
      checked_libs = small_libs
      checked_libs.extend(available_libs)
-     checked_libs.append(ldlib)
-@@ -510,6 +516,12 @@ while 1:
+     checked_libs.append(sysroot + ldlib)
+@@ -513,6 +519,12 @@ while 1:
              names = symbol.base_names()
              for name in names:
                  present_symbols[name] = symbol
@@ -82,7 +83,7 @@ index c5614ea..b0d9034 100755
  
      # are we finished?
      num_unresolved = 0
-@@ -565,6 +577,14 @@ while 1:
+@@ -568,6 +580,14 @@ while 1:
      for name in needed_symbols:
          if not name in symbol_provider:
              if not needed_symbols[name].weak:
@@ -98,5 +99,5 @@ index c5614ea..b0d9034 100755
          else:
              lib = symbol_provider[name]
 -- 
-1.8.5.2.233.g932f7e4
+2.16.1
 
-- 
2.16.1




More information about the Openembedded-core mailing list