From 12d150727a8dff2d6a4c3013936c27fe71ce588d Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Tue, 4 Feb 2014 16:36:18 +0100 Subject: 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 Signed-off-by: Peter Korsgaard --- package/gcc/gcc-final/gcc-final.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'package/gcc') diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk index 47b30da105..ecc4068b49 100644 --- a/package/gcc/gcc-final/gcc-final.mk +++ b/package/gcc/gcc-final/gcc-final.mk @@ -103,14 +103,12 @@ HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_LD_LINUX_LINK endif # Cannot use the HOST_GCC_FINAL_USR_LIBS mechanism below, because we want -# libgcc_s to be installed in /lib and not /usr/lib. We add +x on -# libgcc_s to ensure it will be stripped. +# libgcc_s to be installed in /lib and not /usr/lib. define HOST_GCC_FINAL_INSTALL_LIBGCC -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgcc_s* \ $(STAGING_DIR)/lib/ -cp -dpf $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib*/libgcc_s* \ $(TARGET_DIR)/lib/ - -chmod +x $(TARGET_DIR)/lib/libgcc_s.so.1 endef HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBGCC -- cgit v1.2.3