[git commit] librt: Use -nodefaultlibs instead of -nostdlib

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Sun Mar 22 13:49:27 UTC 2015


commit: http://git.uclibc.org/uClibc/commit/?id=534f44d53146457b3ca686c47efb9207543b88e1
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

nostdlib disables linking in startup files too which is not
what we want here since it needs to resolve __dso_handle
which comes from crtbeginS.o, otherwise librt has this
undefined reference to a weak undefined __dso_handle that
shows up as error (with gold linker)
when shared libraries are being built which are
linking in librt

Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 librt/Makefile.in |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/librt/Makefile.in b/librt/Makefile.in
index 8555e94..fbbf5b4 100644
--- a/librt/Makefile.in
+++ b/librt/Makefile.in
@@ -15,6 +15,9 @@ LIBS-librt.so := $(LIBS)
 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
 LIBS-librt.so += $(top_builddir)lib/libdl.so $(top_builddir)lib/libpthread.so
 endif
+START_FILE-librt.so := $(SHARED_START_FILES)
+END_FILE-librt.so := $(SHARED_END_FILES)
+
 
 librt_FULL_NAME := librt-$(VERSION).so
 


More information about the uClibc-cvs mailing list