summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpthread/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpthread/Makefile b/libpthread/Makefile
index e07d0be8c..709d22b49 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -31,10 +31,14 @@ LIBTHREAD_DB_SHARED_FULLNAME=libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SU
DIRS=
ifeq ($(strip $(UCLIBC_HAS_THREADS)),y)
DIRS+=linuxthreads
+ LDFLAGS_THREAD:= $(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc -z defs
ifeq ($(strip $(PTHREADS_DEBUG_SUPPORT)),y)
DIRS+=linuxthreads_db
LDFLAGS_THREAD_DB:= $(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc
endif
+ifeq ($(DODEBUG),n)
+ LDFLAGS_THREAD_DB+=-s
+endif
endif
ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y)
@@ -72,7 +76,7 @@ $(OBJ): Makefile
shared: all
if [ -f $(LIBPTHREAD) ] ; then \
set -e; \
- $(LD) $(LDFLAGS) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
+ $(LD) $(LDFLAGS_THREAD) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
-o $(LIBPTHREAD_SHARED_FULLNAME) $(SHARED_START_FILES) --whole-archive $(LIBPTHREAD) \
--no-whole-archive $(TOPDIR)libc/misc/internals/interp.o \
-L$(TOPDIR)lib -lc $(LDADD_LIBFLOAT) $(LIBGCC) \