diff options
author | Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> | 2012-06-21 19:34:50 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2012-06-23 23:14:59 +0200 |
commit | 2a97045d5daeb7cb7222f1ffe0532930d5b3140d (patch) | |
tree | f4d8dcdba91dbff98aef7a2f93b0fd10d703e660 /Makefile | |
parent | 75f18de67e7bc7f1feb360eb4201a3c6d6773698 (diff) | |
download | buildroot-novena-2a97045d5daeb7cb7222f1ffe0532930d5b3140d.tar.gz buildroot-novena-2a97045d5daeb7cb7222f1ffe0532930d5b3140d.zip |
build: add option to exclude executables/dirs from being stripped
Sometimes it may be desirable to keep debug symbols for some binaries and
libraries on the target. This commit introduces the config option
BR2_STRIP_EXCLUDE_FILES, which is interpreted as a list of such binaries
and libraries, and the option BR2_STRIP_EXCLUDE_DIRS, which indicates
directories excluded from stripping entirely.
These exclusions are passed to the find command in the target-finalize step.
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -386,6 +386,13 @@ $(BUILD_DIR)/.root: $(TARGET_DIR): $(BUILD_DIR)/.root +STRIP_FIND_CMD = find $(TARGET_DIR) +ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) +STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o +endif +STRIP_FIND_CMD += -type f -perm +111 +STRIP_FIND_CMD += -not \( $(call findfileclauses,libthread_db*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print + target-finalize: ifeq ($(BR2_HAVE_DEVFILES),y) ( support/scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) ) @@ -410,8 +417,7 @@ endif 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 + $(STRIP_FIND_CMD) | xargs $(STRIPCMD) 2>/dev/null || true find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \ xargs -r $(KSTRIPCMD) || true |