diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-04-15 12:43:14 -0500 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-04-15 12:43:14 -0500 |
commit | 003946e5f5ad775ef64b72176018bf918899c5d3 (patch) | |
tree | 94404f0abac8db76d2fe68f2573977be88c9d1db /librt | |
parent | dd64f5afc19274f4e92afde3d13d1e8f0d2ee2d5 (diff) | |
parent | c78cc48514723c9182a4fb5baa35bd59b8485cc7 (diff) |
merge uClibc master
Diffstat (limited to 'librt')
-rw-r--r-- | librt/Makefile.in | 22 | ||||
-rw-r--r-- | librt/dso_handle.c | 5 |
2 files changed, 17 insertions, 10 deletions
diff --git a/librt/Makefile.in b/librt/Makefile.in index 1c1559c4a..1536a5cb9 100644 --- a/librt/Makefile.in +++ b/librt/Makefile.in @@ -13,19 +13,15 @@ LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-librt.so := -Wl,--dsbt-index=9 LDFLAGS-librt.so := $(LDFLAGS) LIBS-librt.so := $(LIBS) ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) -LIBS-librt.so += $(top_builddir)lib/libdl.so $(top_builddir)lib/libpthread.so +LIBS-librt.so += $(top_builddir)lib/libpthread.so \ + $(CC_FLAG_ASNEEDED) $(top_builddir)lib/libdl.so $(CC_FLAG_NO_ASNEEDED) endif -START_FILE-librt.so := $(SHARED_START_FILES) -END_FILE-librt.so := $(SHARED_END_FILES) - librt_FULL_NAME := librt-$(VERSION).so librt_DIR := $(top_srcdir)librt librt_OUT := $(top_builddir)librt -ifeq ($(UCLIBC_HAS_REALTIME),y) - librt_SRC := $(notdir $(wildcard $(librt_DIR)/*.c)) librt_filter_SRC := ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) @@ -45,8 +41,10 @@ librt_filter_SRC += $(if $(UCLIBC_HAS_ADVANCED_REALTIME),, \ spawn_faction_addopen.c \ spawn_faction_init.c) -librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC)) +librt_filter_SRC += $(if $(UCLIBC_HAS_STUBS),,rt_stubs.c) +librt_filter_SRC += $(if $(HAS_NO_THREADS),dso_handle.c) +librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC)) librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC)) librt_OBJ += $(patsubst $(librt_DIR)/%.S,$(librt_OUT)/%.o,$(librt_SSRC)) @@ -60,15 +58,19 @@ librt-a-y += $(librt_OBJ) endif librt-so-y += $(librt_OBJ:.o=.oS) +ifeq ($(UCLIBC_HAS_REALTIME),y) lib-a-y += $(top_builddir)lib/librt.a lib-so-y += $(top_builddir)lib/librt.so endif +librt-dep-y := $(libc.depend) +librt-dep-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread.depend) $(libdl.depend) -ifeq ($(DOPIC)$(UCLIBC_HAS_THREADS_NATIVE),yn) -$(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(libc.depend) +# for NPTL we need SHARED regardless of DOPIC +ifeq ($(if $(UCLIBC_HAS_THREADS_NATIVE),,$(DOPIC)),y) +$(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(librt-dep-y) else -$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc.depend) $(libpthread.depend) $(libdl.depend) +$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(librt-dep-y) endif $(call link.so,$(librt_FULL_NAME),$(ABI_VERSION)) diff --git a/librt/dso_handle.c b/librt/dso_handle.c new file mode 100644 index 000000000..633907103 --- /dev/null +++ b/librt/dso_handle.c @@ -0,0 +1,5 @@ +/* Copyright (C) 2015 Bernhard Reutner-Fischer + * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball. + */ + +const void *const __dso_handle attribute_hidden = &__dso_handle; |