Index: Makerules
===================================================================
--- Makerules	(revision 22200)
+++ Makerules	(working copy)
@@ -121,6 +121,8 @@ maybe_exec = $(if $(strip $(compare_flag
 		@set -e; \
 		$(disp_$(1)); \
 		$(cmd_$(1)); \
+		$(if $(strip $(filter $@,$(subst $(top_srcdir),,$(STRIP_T_FILES)))),$(disp_t_strip);$(cmd_t_strip);) \
+		$(if $(strip $(filter $@,$(subst $(top_srcdir),,$(STRIP_FILES)))),$(disp_strip);$(cmd_strip);) \
 		echo 'cmd_$@ := $(cmd_$1)' >> $(dir $@).$(notdir $@).dep)
 
 CFLAGS_gen.dep = -MT $@ -MD -MP -MF $(dir $@).$(notdir $@).dep
Index: libpthread/linuxthreads.old/Makefile.in
===================================================================
--- libpthread/linuxthreads.old/Makefile.in	(revision 22200)
+++ libpthread/linuxthreads.old/Makefile.in	(working copy)
@@ -83,13 +83,13 @@ $(top_builddir)lib/libpthread.so: $(libp
 #	$(call linkm.so,$(libpthread_FULL_NAME),$(MAJOR_VERSION))
 #endif
 
-$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
-	$(Q)$(RM) $@
+STRIP_T_FILES+=$(libpthread_so-y) $(libpthread-a-y)
 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-	$(do_strip:-x=-X --strip-debug)
-else
-	$(do_strip)
+$(libpthread_so-y) $(libpthread-a-y): STRIP_FLAGS=$(STRIP_FLAGS:-x=-X --strip-debug)
 endif
+
+$(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
+	$(Q)$(RM) $@
 	$(do_ar)
 
 $(libpthread_OUT)/libpthread.oS: $(libpthread_SRC) $(libpthread_SPEC_SRC)
@@ -104,11 +104,6 @@ endif
 $(top_builddir)lib/libpthread.a: $(libpthread-a-y)
 	$(Q)$(INSTALL) -d $(dir $@)
 	$(Q)$(RM) $@
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-	$(do_strip:-x=-X --strip-debug)
-else
-	$(do_strip)
-endif
 	$(do_ar)
 
 linuxthreads_headers:
Index: libpthread/linuxthreads/Makefile.in
===================================================================
--- libpthread/linuxthreads/Makefile.in	(revision 22200)
+++ libpthread/linuxthreads/Makefile.in	(working copy)
@@ -18,8 +18,10 @@ CFLAGS-libpthread/linuxthreads/sysdeps/p
 # and append -O1 if found
 #CFLAGS:=$(CFLAGS:-O0=-O1)
 
+STRIP_T_FILES+=$(libpthread_so-y) $(libpthread-a-y)
 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
 LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
+$(libpthread_so-y) $(libpthread-a-y): STRIP_FLAGS=$(STRIP_FLAGS:-x=-X --strip-debug)
 else
 LDFLAGS-libpthread.so := $(LDFLAGS)
 endif
@@ -98,11 +100,6 @@ $(top_builddir)lib/libpthread.so: $(libp
 
 $(libpthread_OUT)/libpthread_so.a: $(libpthread-so-y)
 	$(Q)$(RM) $@
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-	$(do_strip:-x=-X --strip-debug)
-else
-	$(do_strip)
-endif
 	$(do_ar)
 
 $(libpthread_OUT)/libpthread.oS: $(libpthread_SRC)
@@ -117,11 +114,6 @@ endif
 $(top_builddir)lib/libpthread.a: $(libpthread-a-y)
 	$(Q)$(INSTALL) -d $(dir $@)
 	$(Q)$(RM) $@
-ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-	$(do_strip:-x=-X --strip-debug)
-else
-	$(do_strip)
-endif
 	$(do_ar)
 
 linuxthreads_headers:
