OSDN Git Service

Fix up a few little problems
authorEric Andersen <andersen@codepoet.org>
Wed, 16 May 2001 20:14:45 +0000 (20:14 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 16 May 2001 20:14:45 +0000 (20:14 -0000)
Makefile
Rules.mak
extra/gcc-uClibc/Makefile
libc/Makefile

index 296f14c..b1d70a8 100644 (file)
--- 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
index 1b065a1..e26a75a 100644 (file)
--- 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
 
 
index 773a3b4..71e3162 100644 (file)
@@ -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
index 33c5bf9..18142f9 100644 (file)
@@ -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