summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/Makefile6
-rw-r--r--libpthread/linuxthreads/Makefile5
2 files changed, 9 insertions, 2 deletions
diff --git a/libpthread/Makefile b/libpthread/Makefile
index ac9f4a20c..22f0a0218 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -27,12 +27,14 @@ LIBPTHREAD_SHARED_FULLNAME=libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEV
LIBTHREAD_DB=libthread_db.a
LIBTHREAD_DB_SHARED=libthread_db.so.1
LIBTHREAD_DB_SHARED_FULLNAME=libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
+
DIRS=
ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
DIRS+=linuxthreads
+ LDFLAGS_PTHREADS:= $(LDFLAGS)
ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
DIRS+=linuxthreads_db
+ LDFLAGS_PTHREADS:= $(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc
endif
endif
@@ -76,7 +78,7 @@ $(OBJ): Makefile
shared: all
if [ -f $(LIBPTHREAD) ] ; then \
set -e; \
- $(LD) $(LDFLAGS) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
+ $(LD) $(LDFLAGS_PTHREADS) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
-o $(LIBPTHREAD_SHARED_FULLNAME) $(START_FILES) --whole-archive $(LIBPTHREAD) \
--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
-L$(TOPDIR)/lib -lc $(END_FILES); \
diff --git a/libpthread/linuxthreads/Makefile b/libpthread/linuxthreads/Makefile
index 2c87e3aa2..cb0894224 100644
--- a/libpthread/linuxthreads/Makefile
+++ b/libpthread/linuxthreads/Makefile
@@ -55,7 +55,12 @@ ar-target: $(OBJS)
$(COBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
+ $(STRIPTOOL) -X --strip-debug -R .note -R .comment $*.o
+ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
+ $(STRIPTOOL) -X --strip-debug -R .note -R .comment $*.o
+else
$(STRIPTOOL) -x -R .note -R .comment $*.o
+endif
clean:
rm -f *.[oa] *~ core