summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-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 6142911cff..3aaf9998e0 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -291,12 +291,16 @@ def runstrip(file, elftype, d):
291 os.chmod(file, newmode) 291 os.chmod(file, newmode)
292 292
293 extraflags = "" 293 extraflags = ""
294 # .so and shared library 294
295 if ".so" in file and elftype & 8: 295 # split_and_strip_files is calling this with elf_type None, causing:
296 extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded" 296 # TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'
297 # shared or executable: 297 if elftype:
298 elif elftype & 8 or elftype & 4: 298 # .so and shared library
299 extraflags = "--remove-section=.comment --remove-section=.note" 299 if ".so" in file and elftype & 8:
300 extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
301 # shared or executable:
302 elif elftype & 8 or elftype & 4:
303 extraflags = "--remove-section=.comment --remove-section=.note"
300 304
301 stripcmd = "'%s' %s '%s'" % (strip, extraflags, file) 305 stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
302 bb.debug(1, "runstrip: %s" % stripcmd) 306 bb.debug(1, "runstrip: %s" % stripcmd)