summaryrefslogtreecommitdiffstats
path: root/libpthread/linuxthreads_db
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads_db')
-rw-r--r--libpthread/linuxthreads_db/Makefile.in26
-rw-r--r--libpthread/linuxthreads_db/td_init.c3
-rw-r--r--libpthread/linuxthreads_db/thread_dbP.h8
3 files changed, 24 insertions, 13 deletions
diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in
index 7833e1bad..1dd2b02b0 100644
--- a/libpthread/linuxthreads_db/Makefile.in
+++ b/libpthread/linuxthreads_db/Makefile.in
@@ -1,15 +1,17 @@
# Makefile for uClibc
#
-# Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
+# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
# Get the thread include dependencies and shared object name
-CFLAGS-linuxthreads_db := -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-CFLAGS-linuxthreads_db += -D_GNU_SOURCE
+CFLAGS-linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(call check_ld,--warn-unresolved-symbols)
+ifneq ($(NOSTRIP),y)
+LDFLAGS-libthread_db.so += -s
+endif
LIBS-libthread_db.so := $(LIBS)
@@ -29,26 +31,34 @@ else
libthread_db-a-y := $(libthread_db_OBJ)
endif
-libthread_db-multi-y := $(libthread_db_SRC)
-
lib-a-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.a
lib-so-$(PTHREADS_DEBUG_SUPPORT) += $(top_builddir)lib/libthread_db.so
objclean-y += libthread_db_clean
headers-$(PTHREADS_DEBUG_SUPPORT) += linuxthreads_db_headers
headers_clean-y += linuxthreads_db_headers_clean
+#ifeq ($(DOMULTI),n)
ifeq ($(DOPIC),y)
$(top_builddir)lib/libthread_db.so: $(top_builddir)lib/libthread_db.a $(libc)
else
$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db_so.a $(libc)
endif
$(call link.so,$(libthread_db_FULL_NAME),1)
+#else
+#$(top_builddir)lib/libthread_db.so: $(libthread_db_OUT)/libthread_db.oS | $(libc)
+# $(call linkm.so,$(libthread_db_FULL_NAME),1)
+#endif
$(libthread_db_OUT)/libthread_db_so.a: $(libthread_db-so-y)
$(Q)$(RM) $@
$(do_strip)
$(do_ar)
+$(libthread_db_OUT)/libthread_db.oS: $(libthread_db_SRC)
+ $(Q)$(RM) $@
+ $(compile-m)
+ $(do_t_strip)
+
$(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
$(Q)$(INSTALL) -d $(dir $@)
$(Q)$(RM) $@
@@ -56,10 +66,10 @@ $(top_builddir)lib/libthread_db.a: $(libthread_db-a-y)
$(do_ar)
linuxthreads_db_headers:
- $(LN) -sf ../$(PTDIR)_db/thread_db.h $(top_builddir)include/
+ $(Q)$(LN) -sf ../$(PTDIR)_db/thread_db.h $(top_builddir)include/
linuxthreads_db_headers_clean:
$(RM) $(top_builddir)include/thread_db.h
libthread_db_clean:
- $(RM) $(libthread_db_OUT)/*.{o,os,a}
+ $(RM) $(libthread_db_OUT)/*.{o,os,oS,a}
diff --git a/libpthread/linuxthreads_db/td_init.c b/libpthread/linuxthreads_db/td_init.c
index d714f1ba0..6f0e1584c 100644
--- a/libpthread/linuxthreads_db/td_init.c
+++ b/libpthread/linuxthreads_db/td_init.c
@@ -20,8 +20,9 @@
#include "thread_dbP.h"
+#ifndef NDEBUG
int __td_debug;
-
+#endif
td_err_e
td_init (void)
diff --git a/libpthread/linuxthreads_db/thread_dbP.h b/libpthread/linuxthreads_db/thread_dbP.h
index 63b408afc..30bdae451 100644
--- a/libpthread/linuxthreads_db/thread_dbP.h
+++ b/libpthread/linuxthreads_db/thread_dbP.h
@@ -9,7 +9,7 @@
#include "../linuxthreads/descr.h"
-/* Indeces for the symbol names. */
+/* Indices for the symbol names. */
enum
{
PTHREAD_THREADS_EVENTS = 0,
@@ -32,7 +32,7 @@ enum
/* Comment out the following for less verbose output. */
#ifndef NDEBUG
# define LOG(c) if (__td_debug) write (2, c "\n", strlen (c "\n"))
-extern int __td_debug;
+extern int __td_debug attribute_hidden;
#else
# define LOG(c)
#endif
@@ -84,7 +84,7 @@ struct agent_list
};
/* List of all known descriptors. */
-extern struct agent_list *__td_agent_list;
+extern struct agent_list *__td_agent_list attribute_hidden;
/* Function used to test for correct thread agent pointer. */
static inline int
@@ -103,6 +103,6 @@ ta_ok (const td_thragent_t *ta)
/* Internal wrapper around ps_pglobal_lookup. */
-extern int td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr);
+extern int td_lookup (struct ps_prochandle *ps, int idx, psaddr_t *sym_addr) attribute_hidden;
#endif /* thread_dbP.h */