Revision: 7402
http://sourceforge.net/p/astlinux/code/7402
Author: abelbeck
Date: 2015-12-13 17:09:41 +0000 (Sun, 13 Dec 2015)
Log Message:
-----------
build system, use find -perm /mode, instead of -perm +mode for stripping binaries, without it CentOS 7 will not strip anything resulting in a 50% larger image.
Note: he -perm +mode is deprecated, and sometimes yields suprising results.
It can be confused with permission in symbolic mode, for example '+u+g',
as POSIX spec suggests.
Modified Paths:
--------------
branches/1.0/Makefile
Modified: branches/1.0/Makefile
===================================================================
--- branches/1.0/Makefile 2015-12-13 15:13:55 UTC (rev 7401)
+++ branches/1.0/Makefile 2015-12-13 17:09:41 UTC (rev 7402)
@@ -447,11 +447,21 @@
ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
endif
- find $(TARGET_DIR) -type f -perm +111 '!' -name 'libthread_db*.so*' | \
- xargs $(STRIPCMD) 2>/dev/null || true
- find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
- xargs -r $(KSTRIPCMD) || true
+# strip file exclusions:
+# - libpthread.so: a non-stripped libpthread shared library is needed for
+# proper debugging of pthread programs using gdb.
+# - kernel modules (*.ko): do not function properly when stripped like normal
+# applications and libraries. Normally kernel modules are already excluded
+# by the executable permission check above, so the explicit exclusion is only
+# done for kernel modules with incorrect permissions.
+
+ find $(TARGET_DIR) -type f \( -perm /111 -o -name '*.so*' \) -not \( -name 'libpthread*.so*' -o -name '*.ko' \) -print0 | \
+ xargs -0 $(STRIPCMD) 2>/dev/null || true
+ if test -d $(TARGET_DIR)/lib/modules; then \
+ find $(TARGET_DIR)/lib/modules -type f -name '*.ko' -print0 | \
+ xargs -0 -r $(KSTRIPCMD); fi
+
mkdir -p $(TARGET_DIR)/etc
# Mandatory configuration file and auxilliary cache directory
# for recent versions of ldconfig
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|