aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Richard Braun <rbraun@sceen.net>2012-11-20 07:18:11 +0000
committerGravatar Peter Korsgaard <jacmet@sunsite.dk>2012-11-30 13:59:40 -0800
commit6ae7886f84e8ca856854fa9ee1a15547f171e8c6 (patch)
treeef77a646dce4f71c3faa1bfc8309be1462bec253 /Makefile
parent696365f69bdf6261e8b312f98bdc177754bd5517 (diff)
downloadbuildroot-6ae7886f84e8ca856854fa9ee1a15547f171e8c6.tar.gz
buildroot-6ae7886f84e8ca856854fa9ee1a15547f171e8c6.tar.bz2
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>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1e257e97e2..1141ef2c03 100644
--- a/Makefile
+++ b/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
endif
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:
ifeq ($(BR2_HAVE_DEVFILES),y)
@@ -456,6 +456,14 @@ endif
find $(TARGET_DIR)/lib/modules -type f -name '*.ko' | \
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
# Mandatory configuration file and auxilliary cache directory
# for recent versions of ldconfig