From 23b0e13d2e32c255ea8389bf07557e5d6fcad198 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 1 Mar 2003 11:02:44 +0000 Subject: Teach ldd to act just the glibc provided one (relying on the shared lib loader to do the work) when it is possible to do so, and only go poking about through the ELF headers when that fails so we can still use 'ldd' on cross compiled stuff. -Erik --- ldso/util/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ldso/util/Makefile') diff --git a/ldso/util/Makefile b/ldso/util/Makefile index 0f36bd31e..7d49ee523 100644 --- a/ldso/util/Makefile +++ b/ldso/util/Makefile @@ -33,6 +33,10 @@ TARGETS += ldconfig endif all: $(TARGETS) +ifeq ($(strip $(LDSO_LDD_SUPPORT)),y) +XXFLAGS=-D__LDSO_LDD_SUPPORT +endif + elf_header: ln -fs $(TOPDIR)include/elf.h @@ -58,7 +62,7 @@ ldconfig: ldconfig.o readsoname.o strip -x -R .note -R .comment $@ ldd: ldd.c - $(HOSTCC) $(HOSTCFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ + $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I . \ @@ -66,7 +70,7 @@ ldd: ldd.c strip -x -R .note -R .comment $@ ldd.target: ldd.c - $(TARGET_CC) $(CFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ + $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \ -- cgit v1.2.3