@@ -432,9 +432,7 @@ config BR2_STRIP_strip
help
Binaries and libraries in the target filesystem will be
stripped using the normal 'strip' command. This allows to save
- space, mainly by removing debugging symbols. Debugging symbols
- on the target are needed for native debugging, but not when
- remote debugging is used.
+ space, mainly by removing debugging symbols.
config BR2_STRIP_EXCLUDE_FILES
string "executables that should not be stripped"
@@ -763,8 +763,6 @@ endif
ifneq ($(BR2_ENABLE_DEBUG):$(BR2_STRIP_strip),y:)
rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug
endif
- $(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true
- $(STRIP_FIND_SPECIAL_LIBS_CMD) | xargs -0 -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) 2>/dev/null || true
test -f $(TARGET_DIR)/etc/ld.so.conf && \
{ echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true
@@ -171,6 +171,10 @@ $$(BINARIES_DIR)/$$(ROOTFS_$(2)_FINAL_IMAGE_NAME): $$(ROOTFS_$(2)_DEPENDENCIES)
--exclude=/$$(notdir $$(TARGET_DIR_WARNING_FILE)) \
$$(BASE_TARGET_DIR)/ \
$$(TARGET_DIR)
+ifeq ($$(BR2_STRIP_strip),y)
+ $$(STRIP_FIND_CMD) | xargs -0 $$(STRIPCMD) 2>/dev/null || true
+ $$(STRIP_FIND_SPECIAL_LIBS_CMD) | xargs -0 -r $$(STRIPCMD) $$(STRIP_STRIP_DEBUG) 2>/dev/null || true
+endif
echo '#!/bin/sh' > $$(FAKEROOT_SCRIPT)
echo "set -e" >> $$(FAKEROOT_SCRIPT)
@@ -224,14 +224,9 @@ TARGET_READELF = $(TARGET_CROSS)readelf
TARGET_OBJCOPY = $(TARGET_CROSS)objcopy
TARGET_OBJDUMP = $(TARGET_CROSS)objdump
-ifeq ($(BR2_STRIP_strip),y)
STRIP_STRIP_DEBUG := --strip-debug
-TARGET_STRIP = $(TARGET_CROSS)strip
-STRIPCMD = $(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
-else
TARGET_STRIP = /bin/true
-STRIPCMD = $(TARGET_STRIP)
-endif
+STRIPCMD = $(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
INSTALL := $(shell which install || type -p install)
UNZIP := $(shell which unzip || type -p unzip) -q