summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rules.mak8
-rw-r--r--ldso/libdl/Makefile2
-rw-r--r--libc/Makefile2
-rw-r--r--test/Rules.mak2
4 files changed, 4 insertions, 10 deletions
diff --git a/Rules.mak b/Rules.mak
index 81de43dd0..12d047577 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -70,6 +70,7 @@ export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION LC_ALL
SHARED_FULLNAME:=libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
SHARED_MAJORNAME:=libc.so.$(MAJOR_VERSION)
UCLIBC_LDSO:=ld-uClibc.so.$(MAJOR_VERSION)
+DYNAMIC_LINKER:=$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)
LIBNAME:=libc.a
LIBC:=$(TOPDIR)libc/$(LIBNAME)
@@ -314,13 +315,6 @@ ifneq ($(DOASSERTS),y)
CFLAGS += -DNDEBUG
endif
-ifeq ($(HAVE_SHARED),y)
- ifeq ($(BUILD_UCLIBC_LDSO),y)
- LDSO:=$(TOPDIR)lib/$(UCLIBC_LDSO)
- DYNAMIC_LINKER:=$(SHARED_LIB_LOADER_PREFIX)/$(UCLIBC_LDSO)
- endif
-endif
-
CFLAGS_NOPIC:=$(CFLAGS)
ifeq ($(DOPIC),y)
CFLAGS += $(PICFLAG)
diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile
index d4d54f911..6a8b46ad6 100644
--- a/ldso/libdl/Makefile
+++ b/ldso/libdl/Makefile
@@ -74,7 +74,7 @@ shared: $(LIBDL_PIC)
$(LD) $(LDFLAGS) -soname=$(LIBDL_SHARED).$(MAJOR_VERSION) \
-o $(LIBDL_SHARED_FULLNAME) -fini dl_cleanup --whole-archive $(LIBDL_PIC) \
--no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
- -L$(TOPDIR)/lib -lc $(LDADD_LIBFLOAT) $(TOPDIR)lib/ld-uClibc.so.0 $(LIBGCC);
+ -L$(TOPDIR)/lib -lc $(LDADD_LIBFLOAT) $(TOPDIR)lib/$(UCLIBC_LDSO) $(LIBGCC);
$(INSTALL) -d $(TOPDIR)lib
$(RM) $(TOPDIR)lib/$(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBDL_SHARED).$(MAJOR_VERSION)
$(INSTALL) -m 644 $(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib
diff --git a/libc/Makefile b/libc/Makefile
index dcd51bb1b..31e4bab17 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -82,7 +82,7 @@ shared: shared_$(LIBNAME)
$(LD) $(LDFLAGS) $(VERSION_SCRIPT) -soname=$(SHARED_MAJORNAME) -o $(SHARED_FULLNAME) \
--whole-archive shared_$(LIBNAME) \
$(TOPDIR)libc/misc/internals/interp.o --no-whole-archive \
- -init __uClibc_init $(TOPDIR)lib/ld-uClibc.so.0 $(LIBGCC) $(LDADD_LIBFLOAT)
+ -init __uClibc_init $(TOPDIR)lib/$(UCLIBC_LDSO) $(LIBGCC) $(LDADD_LIBFLOAT)
@true #$(RM) -r tmp
$(INSTALL) -d $(TOPDIR)lib
$(RM) $(TOPDIR)lib/$(SHARED_FULLNAME)
diff --git a/test/Rules.mak b/test/Rules.mak
index 20000cc35..2591fa523 100644
--- a/test/Rules.mak
+++ b/test/Rules.mak
@@ -95,5 +95,5 @@ ifneq ($(strip $(HAVE_SHARED)),y)
LDFLAGS += -static
GLIBC_LDFLAGS += -static
else
- LDFLAGS += -Wl,-dynamic-linker,$(TOPDIR)lib/ld-uClibc.so.0
+ LDFLAGS += -Wl,-dynamic-linker,$(TOPDIR)lib/$(UCLIBC_LDSO)
endif