Strip *.so* and not only executable files

Our current stripping strategy requires that shared libraries have the
executable permission. However, this is by far not something
recognized as a standard behavior: Debian/Ubuntu distributions for
example do not have executable permissions on their
libraries. Therefore, pushing to upstream packages fixes that add the
executable permissions is not easy.

As a result, this commit improves the stripping logic so that it not
only strips the files that are executable, but also the ones that
match '*.so*', which should match both the shared libraries and the
dlopen()'able plugins, as long as they have a .so extension.

Thanks to this addition, a number of manual "chmod +x" done by various
packages can be removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Thomas Petazzoni
2014-02-04 16:36:18 +01:00
committed by Peter Korsgaard
parent dcd0b3cc7b
commit 12d150727a
6 changed files with 2 additions and 28 deletions

View File

@@ -20,14 +20,6 @@ endef
LIBICONV_POST_INSTALL_TARGET_HOOKS += LIBICONV_TARGET_REMOVE_PRELOADABLE_LIBS
LIBICONV_POST_INSTALL_STAGING_HOOKS += LIBICONV_STAGING_REMOVE_PRELOADABLE_LIBS
# Library lacks +x so strip skips it
define LIBICONV_FIX_LIBRARY_MODE
-chmod +x $(TARGET_DIR)/usr/lib/libcharset.so*
-chmod +x $(TARGET_DIR)/usr/lib/libiconv.so*
endef
LIBICONV_POST_INSTALL_TARGET_HOOKS += LIBICONV_FIX_LIBRARY_MODE
$(eval $(autotools-package))
# Configurations where the toolchain supports locales and the libiconv