summaryrefslogtreecommitdiff
path: root/libc/Makefile.in
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-24 02:55:31 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-26 20:23:24 +0200
commit29ff9055c80efe77a7130767a9fcb3ab8c67e8ce (patch)
treeb061656c1336d7d73ed5eef59352e3d50d8147a7 /libc/Makefile.in
parentb06f85d62c41a4ed108628b1c564203f36c0ab4e (diff)
use a single libc and deduplicate threading code
Similar to musl libc a single libc has many benefits and solves some open issues with uClibc-ng. - no pthread_mutex_* weak symbols exported anymore - applications no longer failing to link when either -lrt or -lpthread are missing for dynamic and static linking mode - smaller C library - slightly better runtime performance
Diffstat (limited to 'libc/Makefile.in')
-rw-r--r--libc/Makefile.in31
1 files changed, 28 insertions, 3 deletions
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 05cec1875..55fd3d3ed 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -18,7 +18,7 @@ endif
CFLAGS-libc :=# intentionally left blank
LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libc.so := -Wl,--dsbt-index=2
LDFLAGS-libc.so := $(LDFLAGS) $(VERSION_SCRIPT) -Wl,-init,$(SYMBOL_PREFIX)__uClibc_init
-LIBS-libc.so := $(interp) $(ldso) $(top_builddir)lib/$(NONSHARED_LIBNAME)
+LIBS-libc.so := $(interp) $(ldso) $(top_builddir)lib/$(NONSHARED_LIBNAME) $(top_builddir)lib/$(NONSHARED_LIBPTHREAD)
# we have SHARED_LIBNAME=libc.so.$(ABI_VERSION) defined in Rules.mak
libc_FULL_NAME := libuClibc-$(VERSION).so
@@ -42,7 +42,32 @@ else
libc-a-y = $(libc-y) $(libc-static-y)
endif
+libc-a-y += $(libnsl-a-y)
+libc-a-y += $(libresolv-a-y)
+libc-a-$(HAVE_SHARED) += $(libdl-a-y)
+libc-a-y += $(libm-a-y)
+libc-a-$(UCLIBC_HAS_LIBUTIL) += $(libutil-a-y)
+libc-a-$(UCLIBC_HAS_CRYPT) += $(libcrypt-a-y)
+libc-a-$(UCLIBC_HAS_ARGP) += $(libuargp-a-y)
+libc-a-$(UCLIBC_HAS_THREADS) += $(libpthread-a-y)
+libc-a-$(UCLIBC_HAS_REALTIME) += $(librt-a-y)
+libc-a-$(UCLIBC_HAS_GETTEXT_AWARENESS) += $(libintl-a-y)
+libc-a-$(UCLIBC_HAS_BACKTRACE) += $(libubacktrace-a-y)
+
libc-so-y = $(libc-y:.o=.os) $(libc-shared-y)
+
+libc-so-y += $(libnsl-so-y)
+libc-so-y += $(libresolv-so-y)
+libc-so-y += $(libdl-so-y)
+libc-so-y += $(libm-so-y)
+libc-so-$(UCLIBC_HAS_LIBUTIL) += $(libutil-so-y)
+libc-so-$(UCLIBC_HAS_CRYPT) += $(libcrypt-so-y)
+libc-so-$(UCLIBC_HAS_ARGP) += $(libuargp-so-y)
+libc-so-$(UCLIBC_HAS_THREADS) += $(libpthread-so-y)
+libc-so-$(UCLIBC_HAS_REALTIME) += $(librt-so-y)
+libc-so-$(UCLIBC_HAS_GETTEXT_AWARENESS) += $(libintl-so-y)
+libc-so-$(UCLIBC_HAS_BACKTRACE) += $(libubacktrace-so-y)
+
lib-a-y += $(top_builddir)lib/libc.a
lib-gdb-y += $(top_builddir)lib/libc.gdb
lib-so-y += $(libc.depend)
@@ -58,9 +83,9 @@ $(libc.depend): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
$(Q)cat $(top_srcdir)extra/scripts/format.lds > $@.tmp
$(Q)$(OUTPUT_FORMAT) >> $@.tmp
ifeq ($(COMPAT_ATEXIT),y)
- $(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_LIBNAME) $(ASNEEDED) )" >> $@.tmp
+ $(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(NONSHARED_LIBPTHREAD) $(SHARED_LIBNAME) $(ASNEEDED) )" >> $@.tmp
else
- $(Q)echo "GROUP ( $(SHARED_LIBNAME) $(NONSHARED_LIBNAME) $(ASNEEDED) )" >> $@.tmp
+ $(Q)echo "GROUP ( $(SHARED_LIBNAME) $(NONSHARED_LIBNAME) $(NONSHARED_LIBPTHREAD) $(ASNEEDED) )" >> $@.tmp
endif
$(Q)mv $@.tmp $@