From 91307a366625e3ec7e618f012269130d2e5bba57 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 4 May 2001 22:29:43 +0000 Subject: This patch allows powerpc to compile again. It also checks if we are compiling for an arch for which uClibc has an ld.so or not, and otherwise sets things up to use the system ld.so. -Erik --- Rules.mak | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index 17d7eb12a..273e45d34 100644 --- a/Rules.mak +++ b/Rules.mak @@ -30,6 +30,7 @@ MINOR_VERSION=9.5 LIBNAME=libc.a SHARED_FULLNAME=uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION) +UCLIBC_LDSO=ld-linux-uclibc.so.$(MAJOR_VERSION) BUILDTIME = $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z") @@ -60,7 +61,23 @@ ifndef $(PREFIX) PREFIX = `pwd`/_install endif -NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/') +NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g') + +LDSO_PRESENT=$(strip $(shell cd $(TOPDIR)/ld.so-1/d-link; ls -d $(TARGET_ARCH) 2>/dev/null)) + +ifeq ($(NATIVE_ARCH), $(TARGET_ARCH)) + SYSTEM_LDSO=$(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=ld.so-1/d-link/$(UCLIBC_LDSO) +else + LDSO=$(SYSTEM_LDSO) +endif + + # It turns out the currently, function-sections causes ldelf2flt to segfault. # So till further notice, this is disabled by default.... -- cgit v1.2.3