mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-26 20:56:33 +00:00
Makefile: fix thread libraries stripping
Strip libthread_db the same as any other library, but strip libpthread with --strip-debug. See the relevant mailing list discussion [1] for additional details. [1] http://lists.busybox.net/pipermail/buildroot/2012-October/060126.html Signed-off-by: Richard Braun <rbraun@sceen.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
This commit is contained in:
parent
696365f69b
commit
6ae7886f84
10
Makefile
10
Makefile
@ -425,7 +425,7 @@ ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
|
|||||||
STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
|
STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
|
||||||
endif
|
endif
|
||||||
STRIP_FIND_CMD += -type f -perm +111
|
STRIP_FIND_CMD += -type f -perm +111
|
||||||
STRIP_FIND_CMD += -not \( $(call findfileclauses,libthread_db*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
|
STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
|
||||||
|
|
||||||
target-finalize:
|
target-finalize:
|
||||||
ifeq ($(BR2_HAVE_DEVFILES),y)
|
ifeq ($(BR2_HAVE_DEVFILES),y)
|
||||||
@ -456,6 +456,14 @@ endif
|
|||||||
find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
|
find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
|
||||||
xargs -r $(KSTRIPCMD) || true
|
xargs -r $(KSTRIPCMD) || true
|
||||||
|
|
||||||
|
# See http://sourceware.org/gdb/wiki/FAQ, "GDB does not see any threads
|
||||||
|
# besides the one in which crash occurred; or SIGTRAP kills my program when
|
||||||
|
# I set a breakpoint"
|
||||||
|
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
|
||||||
|
find $(TARGET_DIR)/lib -type f -name 'libpthread*.so*' | \
|
||||||
|
xargs $(STRIPCMD) $(STRIP_STRIP_DEBUG) || true
|
||||||
|
endif
|
||||||
|
|
||||||
mkdir -p $(TARGET_DIR)/etc
|
mkdir -p $(TARGET_DIR)/etc
|
||||||
# Mandatory configuration file and auxilliary cache directory
|
# Mandatory configuration file and auxilliary cache directory
|
||||||
# for recent versions of ldconfig
|
# for recent versions of ldconfig
|
||||||
|
@ -126,6 +126,7 @@ TARGET_CXX := $(CCACHE) $(TARGET_CXX)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_STRIP_strip),y)
|
ifeq ($(BR2_STRIP_strip),y)
|
||||||
|
STRIP_STRIP_DEBUG:=--strip-debug
|
||||||
STRIP_STRIP_UNNEEDED:=--strip-unneeded
|
STRIP_STRIP_UNNEEDED:=--strip-unneeded
|
||||||
STRIP_STRIP_ALL:=--strip-all
|
STRIP_STRIP_ALL:=--strip-all
|
||||||
TARGET_STRIP=$(TARGET_CROSS)strip
|
TARGET_STRIP=$(TARGET_CROSS)strip
|
||||||
@ -133,6 +134,7 @@ STRIPCMD=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note
|
|||||||
KSTRIPCMD=$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)
|
KSTRIPCMD=$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)
|
||||||
endif
|
endif
|
||||||
ifeq ($(BR2_STRIP_sstrip),y)
|
ifeq ($(BR2_STRIP_sstrip),y)
|
||||||
|
STRIP_STRIP_DEBUG:=
|
||||||
STRIP_STRIP_UNNEEDED:=
|
STRIP_STRIP_UNNEEDED:=
|
||||||
STRIP_STRIP_ALL:=
|
STRIP_STRIP_ALL:=
|
||||||
TARGET_STRIP=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-sstrip
|
TARGET_STRIP=$(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-sstrip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user