diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-05 13:10:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-03-05 13:14:11 +0000 |
commit | 725354886ae3650a7a4875d4c0bffcfab7e8cc40 (patch) | |
tree | 3a6964c20dcb055c6f41718a257dcf4ca20754f9 /meta/classes/package.bbclass | |
parent | 51cfcef15b59f7b97c871d9c0d6bf560c7b06c9b (diff) | |
download | openembedded-core-725354886ae3650a7a4875d4c0bffcfab7e8cc40.tar.gz openembedded-core-725354886ae3650a7a4875d4c0bffcfab7e8cc40.tar.bz2 openembedded-core-725354886ae3650a7a4875d4c0bffcfab7e8cc40.zip |
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
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) |