From 725354886ae3650a7a4875d4c0bffcfab7e8cc40 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 5 Mar 2013 13:10:22 +0000 Subject: package.bbclass: Ensure all .so files get stripped It was realised that .so files which were not marked as executable were not gettings stripped. This was wasting space in images. This patch ensures they do get processed by the code correctly. [YOCTO #3973] Signed-off-by: Richard Purdie --- meta/classes/package.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'meta/classes/package.bbclass') diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index d37499f291..1625ebdb38 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -725,6 +725,8 @@ python split_and_strip_files () { symlinks = {} hardlinks = {} kernmods = [] + libdir = os.path.abspath(dvar + os.sep + d.getVar("libdir", True)) + baselibdir = os.path.abspath(dvar + os.sep + d.getVar("base_libdir", True)) if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT', True) != '1') and \ (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'): for root, dirs, files in os.walk(dvar): @@ -749,7 +751,8 @@ python split_and_strip_files () { # Skip broken symlinks continue # Check its an excutable - if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH): + if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \ + or ((file.startswith(libdir) or file.startswith(baselibdir)) and ".so" in f): # If it's a symlink, and points to an ELF file, we capture the readlink target if os.path.islink(file): target = os.readlink(file) -- cgit v1.2.3