diff options
author | David Schleef <ds@schleef.org> | 2001-07-17 09:44:30 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2001-07-17 09:44:30 +0000 |
commit | ebfd672d318b82b8bf1223ab0600ffc017c891a4 (patch) | |
tree | 0958d08f6fce6b31029f9a6a9ee6b2c195f797d7 | |
parent | ea9de29581fb04f5b85065542faf4ce42ee41808 (diff) |
Better rule for locating dynamic linker
-rw-r--r-- | Rules.mak | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -84,11 +84,8 @@ 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=$(strip $(shell ldd `which $(CC)` | sed -ne /ld/p | sed -e s/\ =.*//g)) -else - SYSTEM_LDSO=/lib/ld-linux.so.2 -endif +SYSTEM_LDSO=$(shell for each in `$(CC) -print-search-dirs|grep ^libraries|sed -e 's/^libraries: //' -e 's/:/ /g'`;do ls $$each/ld.so.* 2>/dev/null;done) +#SYSTEM_LDSO=/lib/ld-linux.so.2 ifeq ($(LDSO_PRESENT), $(TARGET_ARCH)) LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO) @@ -96,7 +93,7 @@ ifeq ($(LDSO_PRESENT), $(TARGET_ARCH)) BUILD_DYNAMIC_LINKER=$(shell cd $(TOPDIR)lib; pwd)/$(UCLIBC_LDSO) else LDSO=$(SYSTEM_LDSO) - DYNAMIC_LINKER=$(SYSTEM_LDSO) + DYNAMIC_LINKER=/lib/$(notdir $(SYSTEM_LDSO)) BUILD_DYNAMIC_LINKER=$(shell cd $(TOPDIR)lib; pwd)/$(UCLIBC_LDSO) endif |