summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--Rules.mak5
-rw-r--r--extra/gcc-uClibc/Makefile11
-rw-r--r--libc/Makefile6
4 files changed, 14 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 296f14c2a..b1d70a836 100644
--- a/Makefile
+++ b/Makefile
@@ -140,6 +140,11 @@ install: install_runtime install_dev
install_runtime:
install -d $(INSTALL_DIR)/lib
cp -fa lib/* $(INSTALL_DIR)/lib;
+#ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
+ ln -sf $(INSTALL_DIR)/lib/$(UCLIBC_LDSO) /lib/$(UCLIBC_LDSO);
+ install -d $(INSTALL_DIR)/etc
+ ldso/util/ldconfig
+#endif
# Installs development library and headers
# This is done with the assumption that it can blow away anything
diff --git a/Rules.mak b/Rules.mak
index 1b065a1a5..e26a75a66 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -70,16 +70,19 @@ endif
LDSO_PRESENT=$(strip $(shell cd $(TOPDIR)/ldso/d-link; ls -d $(TARGET_ARCH) 2>/dev/null))
+# NOTE: This may need to be modified for your system
ifeq ($(NATIVE_ARCH), $(TARGET_ARCH))
- SYSTEM_LDSO=$(shell ldd `which $(CC)` | sed -ne /ld/p | sed -e s/\ =.*//g)
+ SYSTEM_LDSO=$(strip $(shell ldd `which $(CC)` | sed -ne /ld/p | sed -e s/\ =.*//g))
else
SYSTEM_LDSO=/lib/ld-linux.so.2
endif
ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO)
+ DYNAMIC_LINKER=/lib/$(UCLIBC_LDSO)
else
LDSO=$(SYSTEM_LDSO)
+ DYNAMIC_LINKER=$(SYSTEM_LDSO)
endif
diff --git a/extra/gcc-uClibc/Makefile b/extra/gcc-uClibc/Makefile
index 773a3b429..71e31620c 100644
--- a/extra/gcc-uClibc/Makefile
+++ b/extra/gcc-uClibc/Makefile
@@ -1,14 +1,6 @@
TOPDIR = ../../
include $(TOPDIR)Rules.mak
-# NOTE: This may need to be modified for your system
-ifeq ($(LDSO_PRESENT), $(TARGET_ARCH))
- DYNAMIC_LINKER=$(INSTALL_DIR)/lib/$(UCLIBC_LDSO)
-else
- DYNAMIC_LINKER=$(SYSTEM_LDSO)
-endif
-
-
UCLIBC_DIR = $(shell (cd ../.. ; /bin/pwd))
GCC_BIN = $(shell which $(CC))
LD_BIN = $(shell which $(LD))
@@ -33,7 +25,8 @@ gcc-uClibc: gcc-uClibc.h gcc-uClibc.c
ld-uClibc:
@echo "#!/bin/sh" > $(TARGET_ARCH)-uclibc-ld
@echo "# This file was autogenerated by make" >> $(TARGET_ARCH)-uclibc-ld
- @echo "$(LD_BIN) -L- -L $(INSTALL_DIR)/lib -L$(UCLIBC_DIR) \$$@" >> $(TARGET_ARCH)-uclibc-ld
+ @echo "$(LD_BIN) -L- -L$(INSTALL_DIR)/lib -L$(INSTALL_DIR)/usr/lib "\
+ "-L$(UCLIBC_DIR) \$$@" >> $(TARGET_ARCH)-uclibc-ld
chmod a+x $(TARGET_ARCH)-uclibc-ld
install: all
diff --git a/libc/Makefile b/libc/Makefile
index 33c5bf9e5..18142f9ee 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -46,13 +46,13 @@ shared: $(TOPDIR)lib/$(LIBNAME)
@(cd tmp; CC=$(CC) /bin/sh ../../extra/scripts/get-needed-libgcc-objects.sh)
if [ -s ./tmp/libgcc-need.a ] ; then \
$(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
- -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
+ -Wl,-soname=$(SHARED_MAJORNAME) -Wl,--whole-archive \
./$(LIBNAME) ./tmp/libgcc-need.a \
- $(LDSO) ; \
+ $(LDSO) -Wl,--dynamic-linker,$(DYNAMIC_LINKER); \
else \
$(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \
-Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \
- ./$(LIBNAME) $(LDSO) ; \
+ ./$(LIBNAME) $(LDSO) -Wl,-dynamic-linker=$(DYNAMIC_LINKER); \
fi
@rm -rf tmp
install -d $(TOPDIR)lib