summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package.bbclass16
1 files changed, 10 insertions, 6 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 44e551f6dd..c03e5be028 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -298,12 +298,16 @@ def runstrip(file, elftype, d):
298 os.chmod(file, newmode) 298 os.chmod(file, newmode)
299 299
300 extraflags = "" 300 extraflags = ""
301 # .so and shared library 301
302 if ".so" in file and elftype & 8: 302 # split_and_strip_files is calling this with elf_type None, causing:
303 extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded" 303 # TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'
304 # shared or executable: 304 if elftype:
305 elif elftype & 8 or elftype & 4: 305 # .so and shared library
306 extraflags = "--remove-section=.comment --remove-section=.note" 306 if ".so" in file and elftype & 8:
307 extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
308 # shared or executable:
309 elif elftype & 8 or elftype & 4:
310 extraflags = "--remove-section=.comment --remove-section=.note"
307 311
308 stripcmd = "'%s' %s '%s'" % (strip, extraflags, file) 312 stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
309 bb.debug(1, "runstrip: %s" % stripcmd) 313 bb.debug(1, "runstrip: %s" % stripcmd)